summaryrefslogtreecommitdiffstats
path: root/web/attachments/354598-patch-check_radius.c.txt
blob: 4a571280f842105ff95bd7470960a0d2afb874c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--- 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));
 }