* Set the reply to Access-Accept, if it hasn't already
* been set to something. (i.e. Access-Challenge)
*/
- if (request->reply->code == 0)
- request->reply->code = PW_AUTHENTICATION_ACK;
-
- if ((module_msg = pairfind(request->packet->vps,PW_MODULE_SUCCESS_MESSAGE)) != NULL){
+ if (request->reply->code == 0) {
+ request->reply->code = PW_AUTHENTICATION_ACK;
+ }
+
+ if ((module_msg = pairfind(request->packet->vps, PW_MODULE_SUCCESS_MESSAGE)) != NULL){
char msg[MAX_STRING_LEN+12];
snprintf(msg, sizeof(msg), "Login OK (%s)",
rad_authlog("Login OK", request, 1);
}
- /*
- * Run the modules in the 'post-auth' section.
- */
- result = rad_postauth(request);
-
return result;
}
* control:Response-Packet-Type attribute is present.
*/
vp = pairfind(request->config_items,
- PW_RESPONSE_PACKET_TYPE);
-
+ PW_RESPONSE_PACKET_TYPE);
if (vp) {
if (vp->vp_integer == 256) {
RDEBUG2("Not responding to request %u",
return;
}
}
+
+ if (request->reply->code == PW_AUTHENTICATION_ACK) {
+ rad_postauth(request);
+ }
+
/* FALL-THROUGH */
#ifdef WITH_COA