summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaco Kroon <jaco@uls.co.za>2022-12-16 21:09:31 +0200
committerJaco Kroon <jaco@uls.co.za>2022-12-16 21:09:31 +0200
commitcb80f7505cb21d5ba94ce834e0e7412e648fc141 (patch)
tree76ef6dd4ab154efe35d1771d36d694c4b0191e0e
parent87640b7b5ceb562146a1c4b820c7e151ff078eec (diff)
downloadppp-cb80f7505cb21d5ba94ce834e0e7412e648fc141.tar.gz
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 <jaco@uls.co.za>
-rw-r--r--pppd/plugins/radius/radius.c5
1 files changed, 4 insertions, 1 deletions
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: