I have done some similar job:
I modified module_authorize() in src/main/modules.c
"
if (myresult == RLM_MODULE_NOTFOUND || myresult == RLM_MODULE_NOOP) {
VALUE_PAIR* error_reason = NULL;
error_reason = pairmake("Error-Reason", "User_Not_Exist", T_OP_EQ);
if ( error_reason )
pairadd(&request->reply->vps, error_reason);
else
DEBUG2("build Error-Reason = User_Not_Exist error\n");
}
return myresult;
"
I used ONLY rlm_sql module for authorization, and NOT think about
configure_failover.
>The query 'authorize_reply_query' doesn't execute
>when authoriztion failed, but i need to send reply
>with error code to nas.
>What should i do to make it working ?
=nsinit=
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html