diff --git a/plugins/check_ping.c b/plugins/check_ping.c
index e3f5398bc66ca99887f9d219bb31de6baef970bb..91764666da93e02f76daf4d3de2e729b7680fa29 100644 (file)
--- a/plugins/check_ping.c
+++ b/plugins/check_ping.c
addresses = malloc (sizeof(char*) * max_addr);
addresses[0] = NULL;
- if (process_arguments (argc, argv) != TRUE)
+ if (process_arguments (argc, argv) == ERROR)
usage4 (_("Could not parse arguments"));
/* Set signal handling and alarm */
die (STATE_CRITICAL, _("CRITICAL - Host Unreachable (%s)"), addr);
else if (strstr (buf, "unknown host" ))
die (STATE_CRITICAL, _("CRITICAL - Host not found (%s)"), addr);
+ else if (strstr (buf, "Time to live exceeded"))
+ die (STATE_CRITICAL, _("CRITICAL - Time to live exceeded (%s)"), addr);
if (strstr (buf, "(DUP!)") || strstr (buf, "DUPLICATES FOUND")) {
if (warn_text == NULL)
warn_text = strdup (_(WARN_DUPLICATES));
else if (! strstr (warn_text, _(WARN_DUPLICATES)) &&
asprintf (&warn_text, "%s %s", warn_text, _(WARN_DUPLICATES)) == -1)
- die (STATE_UNKNOWN, _("unable to realloc warn_text"));
+ die (STATE_UNKNOWN, _("Unable to realloc warn_text"));
return (STATE_WARNING);
}
-void
-print_usage (void)
-{
- printf (\
-"Usage: %s -H <host_address> -w <wrta>,<wpl>%% -c <crta>,<cpl>%%\n\
- [-p packets] [-t timeout] [-L] [-4|-6]\n", progname);
- printf (_(UT_HLP_VRS), progname, progname);
-}
-
-
-
void
print_help (void)
{
printf (_(UT_SUPPORT));
}
+
+void
+print_usage (void)
+{
+ printf ("Usage: %s -H <host_address> -w <wrta>,<wpl>%% -c <crta>,<cpl>%%\n\
+ [-p packets] [-t timeout] [-L] [-4|-6]\n", progname);
+}