Skip to content

Commit

Permalink
Allow check_fping to autodetect ipv6 addresses
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Andrew Widdersheim committed Aug 13, 2015
1 parent 82e2841 commit 6a682b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/check_fping.c
Expand Up @@ -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);
Expand Down

0 comments on commit 6a682b3

Please sign in to comment.