]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Fixed usage os Post-Auth-Type REJECT 1341/head
authorHerwin Weststrate <herwin@quarantainenet.nl>
Fri, 23 Oct 2015 13:12:37 +0000 (15:12 +0200)
committerHerwin Weststrate <herwin@quarantainenet.nl>
Fri, 23 Oct 2015 13:12:37 +0000 (15:12 +0200)
The values had been shifted in the dictionaries in commit d9a9d594e666d70b9762c879c2c69d9a9bb38a64, but this piece of code used a hardcoded magic value instead of the autogenerated constant from include/attributes.h. Fix this by using the constant.

src/main/auth.c

index 10a0a3e7819020d7847312713c816c50f5b2aa30..4c8fb3c2e79a691566bcbc8266a39d5298d39118 100644 (file)
@@ -327,13 +327,12 @@ int rad_postauth(REQUEST *request)
                /*
                 *      We WERE going to have a nice reply, but
                 *      something went wrong.  So we've got to run
-                *      Post-Auth-Type Reject, which is defined in the
-                *      dictionaries as having value "1".
+                *      Post-Auth-Type Reject.
                 */
                if (request->reply->code != PW_CODE_ACCESS_REJECT) {
                        RDEBUG("Using Post-Auth-Type Reject");
 
-                       process_post_auth(1, request);
+                       process_post_auth(PW_POST_AUTH_TYPE_REJECT, request);
                }
 
                fr_state_discard(request, request->packet);