summaryrefslogtreecommitdiffstats
path: root/plugins/check_fping.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_fping.c')
-rw-r--r--plugins/check_fping.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/check_fping.c b/plugins/check_fping.c
index 46046b4..521d0fe 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);
@@ -184,7 +184,7 @@ textscan (char *buf)
184 int status = STATE_UNKNOWN; 184 int status = STATE_UNKNOWN;
185 185
186 if (strstr (buf, "not found")) { 186 if (strstr (buf, "not found")) {
187 die (STATE_CRITICAL, _("FPING UNKNOW - %s not found\n"), server_name); 187 die (STATE_CRITICAL, _("FPING UNKNOWN - %s not found\n"), server_name);
188 188
189 } 189 }
190 else if (strstr (buf, "is unreachable") || strstr (buf, "Unreachable")) { 190 else if (strstr (buf, "is unreachable") || strstr (buf, "Unreachable")) {
@@ -314,10 +314,10 @@ process_arguments (int argc, char **argv)
314 usage5 (); 314 usage5 ();
315 case 'h': /* help */ 315 case 'h': /* help */
316 print_help (); 316 print_help ();
317 exit (STATE_OK); 317 exit (STATE_UNKNOWN);
318 case 'V': /* version */ 318 case 'V': /* version */
319 print_revision (progname, NP_VERSION); 319 print_revision (progname, NP_VERSION);
320 exit (STATE_OK); 320 exit (STATE_UNKNOWN);
321 case 'v': /* verbose mode */ 321 case 'v': /* verbose mode */
322 verbose = TRUE; 322 verbose = TRUE;
323 break; 323 break;