--- plugins/check_radius.c.virgin 2009-12-09 18:04:27.000000000 -0800 +++ plugins/check_radius.c 2009-12-09 18:27:42.000000000 -0800 @@ -191,13 +191,16 @@ die (STATE_CRITICAL, _("Timeout")); if (result == ERROR_RC) die (STATE_CRITICAL, _("Auth Error")); - if (result == BADRESP_RC) + if (result == REJECT_RC) die (STATE_WARNING, _("Auth Failed")); + if (result == BADRESP_RC) + die (STATE_WARNING, _("Bad Response")); if (expect && !strstr (msg, expect)) die (STATE_WARNING, "%s", msg); if (result == OK_RC) die (STATE_OK, _("Auth OK")); - return (0); + (void)snprintf(msg, sizeof(msg), "unexpected result code %d", result); + die (STATE_UNKNOWN, _(msg)); }