aboutsummaryrefslogtreecommitdiff
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 46046b4f..521d0fef 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);
@@ -184,7 +184,7 @@ textscan (char *buf)
int status = STATE_UNKNOWN;
if (strstr (buf, "not found")) {
- die (STATE_CRITICAL, _("FPING UNKNOW - %s not found\n"), server_name);
+ die (STATE_CRITICAL, _("FPING UNKNOWN - %s not found\n"), server_name);
}
else if (strstr (buf, "is unreachable") || strstr (buf, "Unreachable")) {
@@ -314,10 +314,10 @@ process_arguments (int argc, char **argv)
usage5 ();
case 'h': /* help */
print_help ();
- exit (STATE_OK);
+ exit (STATE_UNKNOWN);
case 'V': /* version */
print_revision (progname, NP_VERSION);
- exit (STATE_OK);
+ exit (STATE_UNKNOWN);
case 'v': /* verbose mode */
verbose = TRUE;
break;