mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 08:46:58 +08:00
ocserv: enforce a default auth timeout value
That is to prevent processes hanging on inactive sessions.
This commit is contained in:
@@ -912,6 +912,10 @@ size_t urlfw_size = 0;
|
||||
READ_NUMERIC("session-timeout", config->session_timeout);
|
||||
|
||||
READ_NUMERIC("auth-timeout", config->auth_timeout);
|
||||
if (config->auth_timeout == 0) {
|
||||
config->auth_timeout = DEFAULT_AUTH_TIMEOUT_SECS;
|
||||
}
|
||||
|
||||
READ_NUMERIC("idle-timeout", config->idle_timeout);
|
||||
|
||||
config->mobile_idle_timeout = -1;
|
||||
|
||||
@@ -112,6 +112,10 @@ inline static const char *proto_to_str(fw_proto_t proto)
|
||||
#define MIN_NO_COMPRESS_LIMIT 64
|
||||
#define DEFAULT_NO_COMPRESS_LIMIT 256
|
||||
|
||||
/* The time after which a user will be forced to authenticate
|
||||
* or disconnect. */
|
||||
#define DEFAULT_AUTH_TIMEOUT_SECS 1800
|
||||
|
||||
/* The time after a disconnection the cookie is valid */
|
||||
#define DEFAULT_COOKIE_RECON_TIMEOUT 120
|
||||
|
||||
|
||||
Reference in New Issue
Block a user