diff --git a/ChangeLog b/ChangeLog index 93126e8..e108e3a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,7 @@ UNRELEAESD David Schweikert * Add --enable-ipv4 and --enable-ipv6 options to configure (Niclas Zeising) * Fix removing of unreachable hosts when doing loop (Thomas Liske, #13 #23) * Fix -A for fping6 (reported by Matt LaPlante, #14) + * Fix "options inet6" breaking IPv4 name resolution (reported by Matt LaPlante, #17) * Set default data size to 56 bytes on all architectures (#18) * Added contrib/fping.spec (Stephen Schaefer, #24) * Convert man-page source to POD for easier maintenance diff --git a/src/fping.c b/src/fping.c index 4af0170..840f0e6 100644 --- a/src/fping.c +++ b/src/fping.c @@ -2150,6 +2150,12 @@ void add_name( char *name ) #endif /* NIS_GROUPS */ }/* IF */ }/* IF */ + + if(host_ent->h_addrtype != AF_INET) { + print_warning("%s: IPv6 address returned by gethostbyname (options inet6 in resolv.conf?)\n", name ); + num_noaddress++; + return; + } host_add = ( struct in_addr* )*( host_ent->h_addr_list ); if( host_add == NULL )