mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 08:46:58 +08:00
radius: notify of disconnect timeout reason
This commit is contained in:
committed by
Nikos Mavrogiannopoulos
parent
5e6d15db45
commit
ad9e3da777
@@ -257,6 +257,8 @@ VALUE_PAIR *send = NULL, *recvd = NULL;
|
||||
ret = PW_USER_REQUEST;
|
||||
else if (discon_reason == REASON_SERVER_DISCONNECT)
|
||||
ret = PW_ADMIN_RESET;
|
||||
else if (discon_reason == REASON_TIMEOUT)
|
||||
ret = PW_ACCT_IDLE_TIMEOUT;
|
||||
else
|
||||
ret = PW_LOST_CARRIER;
|
||||
if (rc_avpair_add(rh, &send, PW_ACCT_TERMINATE_CAUSE, &ret, -1, 0) == NULL) {
|
||||
|
||||
@@ -108,6 +108,7 @@ extern int syslog_open;
|
||||
#define REASON_ANY 1
|
||||
#define REASON_USER_DISCONNECT 2
|
||||
#define REASON_SERVER_DISCONNECT 3
|
||||
#define REASON_TIMEOUT 4
|
||||
|
||||
#define ERR_SUCCESS 0
|
||||
#define ERR_BAD_COMMAND -2
|
||||
|
||||
@@ -774,7 +774,7 @@ int periodic_check(worker_st * ws, unsigned mtu_overhead, time_t now,
|
||||
if (now - ws->last_msg_tcp > DPD_MAX_TRIES * dpd) {
|
||||
oclog(ws, LOG_ERR,
|
||||
"have not received TCP DPD for very long; tearing down connection");
|
||||
return -1;
|
||||
exit_worker_reason(ws, REASON_TIMEOUT);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user