diff options
author | Andrew Widdersheim <awiddersheim@inetu.net> | 2015-08-13 14:21:01 (GMT) |
---|---|---|
committer | Andrew Widdersheim <awiddersheim@inetu.net> | 2015-08-13 14:21:01 (GMT) |
commit | 6a682b379f1b6ef920cae79fae71b38b99dff39d (patch) | |
tree | 8b29fff5ec4c266ba6121bcbd1946d10c0519ad8 /plugins/check_fping.c | |
parent | 82e28411c8803cdfa1868a530e2a56dc046ada92 (diff) | |
download | monitoring-plugins-6a682b379f1b6ef920cae79fae71b38b99dff39d.tar.gz |
Allow check_fping to autodetect ipv6 addressesrefs/pull/1343/head
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.
Diffstat (limited to 'plugins/check_fping.c')
-rw-r--r-- | plugins/check_fping.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/check_fping.c b/plugins/check_fping.c index 46046b4..274dd75 100644 --- a/plugins/check_fping.c +++ b/plugins/check_fping.c | |||
@@ -105,7 +105,7 @@ main (int argc, char **argv) | |||
105 | xasprintf(&option_string, "%s-I %s ", option_string, sourceif); | 105 | xasprintf(&option_string, "%s-I %s ", option_string, sourceif); |
106 | 106 | ||
107 | #ifdef PATH_TO_FPING6 | 107 | #ifdef PATH_TO_FPING6 |
108 | if (address_family == AF_INET6) | 108 | if (address_family != AF_INET && is_inet6_addr(server)) |
109 | fping_prog = strdup(PATH_TO_FPING6); | 109 | fping_prog = strdup(PATH_TO_FPING6); |
110 | else | 110 | else |
111 | fping_prog = strdup(PATH_TO_FPING); | 111 | fping_prog = strdup(PATH_TO_FPING); |