]> git.ozlabs.org Git - ppp.git/commitdiff
radius: distinguish between User-Request and Admin-Reset.
authorJaco Kroon <jaco@uls.co.za>
Fri, 16 Dec 2022 19:09:31 +0000 (21:09 +0200)
committerJaco Kroon <jaco@uls.co.za>
Fri, 16 Dec 2022 19:09:31 +0000 (21:09 +0200)
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 <jaco@uls.co.za>
pppd/plugins/radius/radius.c

index 02875b4fec2069de9d31339b80df793bf8a709e5..393e7977a8df8652297c0a4a0512e1e2ab1266c5 100644 (file)
@@ -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: