Explorar o código

autodetect ipv6 addresses

John C. Frickson %!s(int64=10) %!d(string=hai) anos
pai
achega
4957d4abbf
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      plugins/check_fping.c

+ 1 - 1
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);