mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-10-13 18:12:03 +08:00
delete client entry after message is sent
This commit is contained in:
+5
-2
@@ -337,7 +337,6 @@ int handle_sec_auth_session_cmd(int cfd, sec_mod_st * sec, const SecAuthSessionM
|
|||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
e->status = PS_AUTH_FAILED;
|
e->status = PS_AUTH_FAILED;
|
||||||
seclog(sec, LOG_ERR, "could not open session.");
|
seclog(sec, LOG_ERR, "could not open session.");
|
||||||
del_client_entry(sec, e);
|
|
||||||
rep.reply = AUTH__REP__FAILED;
|
rep.reply = AUTH__REP__FAILED;
|
||||||
} else {
|
} else {
|
||||||
e->have_session = 1;
|
e->have_session = 1;
|
||||||
@@ -353,7 +352,7 @@ int handle_sec_auth_session_cmd(int cfd, sec_mod_st * sec, const SecAuthSessionM
|
|||||||
return ERR_MEM;
|
return ERR_MEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sec->config_module && sec->config_module->get_sup_config) {
|
if (rep.reply == AUTH__REP__OK && sec->config_module && sec->config_module->get_sup_config) {
|
||||||
ret = sec->config_module->get_sup_config(sec->config, e, &rep, lpool);
|
ret = sec->config_module->get_sup_config(sec->config, e, &rep, lpool);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
seclog(sec, LOG_ERR, "error reading additional configuration for '%s'", e->username);
|
seclog(sec, LOG_ERR, "error reading additional configuration for '%s'", e->username);
|
||||||
@@ -369,6 +368,10 @@ int handle_sec_auth_session_cmd(int cfd, sec_mod_st * sec, const SecAuthSessionM
|
|||||||
seclog(sec, LOG_WARNING, "sec-mod error in sending session reply");
|
seclog(sec, LOG_WARNING, "sec-mod error in sending session reply");
|
||||||
}
|
}
|
||||||
talloc_free(lpool);
|
talloc_free(lpool);
|
||||||
|
|
||||||
|
if (rep.reply != AUTH__REP__OK)
|
||||||
|
del_client_entry(sec, e);
|
||||||
|
|
||||||
} else { /* CLOSE */
|
} else { /* CLOSE */
|
||||||
if (req->has_uptime && req->uptime > e->stats.uptime) {
|
if (req->has_uptime && req->uptime > e->stats.uptime) {
|
||||||
e->stats.uptime = req->uptime;
|
e->stats.uptime = req->uptime;
|
||||||
|
|||||||
Reference in New Issue
Block a user