[monitoring-plugins] Allow check_fping to autodetect ipv6 addresses
Andrew Widdersheim
git at monitoring-plugins.org
Fri Oct 2 10:40:10 CEST 2015
Module: monitoring-plugins
Branch: master
Commit: 6a682b379f1b6ef920cae79fae71b38b99dff39d
Author: Andrew Widdersheim <awiddersheim at inetu.net>
Date: Thu Aug 13 10:21:01 2015 -0400
URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=6a682b3
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.
---
plugins/check_fping.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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)
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);
More information about the Commits
mailing list