From: Jaco Kroon Date: Fri, 16 Dec 2022 19:09:31 +0000 (+0200) Subject: radius: distinguish between User-Request and Admin-Reset. X-Git-Tag: ppp-2.5.0~20^2 X-Git-Url: https://git.ozlabs.org/?p=ppp.git;a=commitdiff_plain;h=cb80f7505cb21d5ba94ce834e0e7412e648fc141 radius: distinguish between User-Request and Admin-Reset. For the purposes of our definition: User-Request - remote side hanging up. Admin-Reset - local side hanging up. Reasoning is that typically radius will be used to authentication dial-in users, so if the pppd gets killed locally, that's not the User (client) requesting hangup, but rather the local administrator (be that a manual kill, or as a result of a CoA/Disconnect). Signed-off-by: Jaco Kroon --- diff --git a/pppd/plugins/radius/radius.c b/pppd/plugins/radius/radius.c index 02875b4..393e797 100644 --- a/pppd/plugins/radius/radius.c +++ b/pppd/plugins/radius/radius.c @@ -1051,10 +1051,13 @@ radius_acct_stop(void) av_type = PW_NAS_ERROR; switch( status ) { case EXIT_OK: - case EXIT_USER_REQUEST: av_type = PW_USER_REQUEST; break; + case EXIT_USER_REQUEST: + av_type = PW_ADMIN_RESET; + break; + case EXIT_HANGUP: case EXIT_PEER_DEAD: case EXIT_CONNECT_FAILED: