mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-04-15 22:00:06 -04:00
Allow check_fping to autodetect ipv6 addresses
Stole the logic in check_ping that allows it to autodetect whether an address is ipv6 or not. Now the user does not have to specify -6 when using check_fping with ipv6 addresses.
This commit is contained in:
parent
82e28411c8
commit
6a682b379f
1 changed files with 1 additions and 1 deletions
|
|
@ -105,7 +105,7 @@ main (int argc, char **argv)
|
|||
xasprintf(&option_string, "%s-I %s ", option_string, sourceif);
|
||||
|
||||
#ifdef PATH_TO_FPING6
|
||||
if (address_family == AF_INET6)
|
||||
if (address_family != AF_INET && is_inet6_addr(server))
|
||||
fping_prog = strdup(PATH_TO_FPING6);
|
||||
else
|
||||
fping_prog = strdup(PATH_TO_FPING);
|
||||
|
|
|
|||
Loading…
Reference in a new issue