projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3db2cd6
)
Added comments and simplified code
author
Alan T. DeKok
<aland@freeradius.org>
Sat, 29 Aug 2009 08:44:54 +0000
(10:44 +0200)
committer
Alan T. DeKok
<aland@freeradius.org>
Sat, 29 Aug 2009 08:44:54 +0000
(10:44 +0200)
src/main/event.c
patch
|
blob
|
history
diff --git
a/src/main/event.c
b/src/main/event.c
index
9a42dbe
..
adb3e21
100644
(file)
--- a/
src/main/event.c
+++ b/
src/main/event.c
@@
-2289,7
+2289,11
@@
static void request_post_handler(REQUEST *request)
}
#endif
}
#endif
- if ((request->reply->code == 0) &&
+ /*
+ * Catch Auth-Type := Reject BEFORE proxying the packet.
+ */
+ if ((request->packet->code == PW_AUTHENTICATION_REQUEST) &&
+ (request->reply->code == 0) &&
((vp = pairfind(request->config_items, PW_AUTH_TYPE)) != NULL) &&
(vp->vp_integer == PW_AUTHTYPE_REJECT)) {
request->reply->code = PW_AUTHENTICATION_REJECT;
((vp = pairfind(request->config_items, PW_AUTH_TYPE)) != NULL) &&
(vp->vp_integer == PW_AUTHTYPE_REJECT)) {
request->reply->code = PW_AUTHENTICATION_REJECT;
@@
-2445,14
+2449,9
@@
static void request_post_handler(REQUEST *request)
break;
default:
break;
default:
- if ((request->packet->code > 1024) &&
- (request->packet->code < (1024 + 254 + 1))) {
- request->next_callback = NULL;
- child_state = REQUEST_DONE;
- break;
- }
-
- radlog(L_ERR, "Unknown packet type %d", request->packet->code);
+ /*
+ * DHCP, VMPS, etc.
+ */
request->next_callback = NULL;
child_state = REQUEST_DONE;
break;
request->next_callback = NULL;
child_state = REQUEST_DONE;
break;