mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 08:46:58 +08:00
radius: properly close accounting for certificate sessions
This commit is contained in:
@@ -802,12 +802,12 @@ int handle_sec_auth_init(int cfd, sec_mod_st * sec, const SecAuthInitMsg * req)
|
||||
|
||||
void sec_auth_user_deinit(sec_mod_st *sec, client_entry_st *e)
|
||||
{
|
||||
if (e->auth_ctx != NULL) {
|
||||
seclog(sec, LOG_DEBUG, "permamently closing session of user '%s' "SESSION_STR, e->auth_info.username, e->auth_info.psid);
|
||||
if (sec->perm_config->acct.amod != NULL && sec->perm_config->acct.amod->close_session != NULL && e->session_is_open != 0) {
|
||||
sec->perm_config->acct.amod->close_session(e->auth_type, e->auth_ctx, &e->auth_info, &e->saved_stats, e->discon_reason);
|
||||
}
|
||||
seclog(sec, LOG_DEBUG, "permamently closing session of user '%s' "SESSION_STR, e->auth_info.username, e->auth_info.psid);
|
||||
if (sec->perm_config->acct.amod != NULL && sec->perm_config->acct.amod->close_session != NULL && e->session_is_open != 0) {
|
||||
sec->perm_config->acct.amod->close_session(e->auth_type, e->auth_ctx, &e->auth_info, &e->saved_stats, e->discon_reason);
|
||||
}
|
||||
|
||||
if (e->auth_ctx != NULL) {
|
||||
if (e->module)
|
||||
e->module->auth_deinit(e->auth_ctx);
|
||||
e->auth_ctx = NULL;
|
||||
|
||||
Reference in New Issue
Block a user