From cb80f7505cb21d5ba94ce834e0e7412e648fc141 Mon Sep 17 00:00:00 2001 From: Jaco Kroon Date: Fri, 16 Dec 2022 21:09:31 +0200 Subject: [PATCH] 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 --- pppd/plugins/radius/radius.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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: -- 2.39.2