RADIUS server: Increase maximum number of sessions

It was possible to hit the previously used maximum of 100 active session
in some hwsim test case sequences like this one: eap_proto_pwd_errors
eap_proto_ikev2_errors eap_proto_sim_errors. This happened due to the
large number of RADIUS authentication iterations in short period of
time, i.e., within the 10 second timeout for expiring completed
sessions.

Increase RADIUS_MAX_SESSION from 100 to 1000 and also reduce the timeout
on expiring completed sessions from 10 to 5 seconds.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2016-12-27 12:14:48 +02:00
parent a5861afcbd
commit 3567730589

View file

@ -25,10 +25,15 @@
*/ */
#define RADIUS_SESSION_TIMEOUT 60 #define RADIUS_SESSION_TIMEOUT 60
/**
* RADIUS_SESSION_MAINTAIN - Completed session expiration timeout in seconds
*/
#define RADIUS_SESSION_MAINTAIN 5
/** /**
* RADIUS_MAX_SESSION - Maximum number of active sessions * RADIUS_MAX_SESSION - Maximum number of active sessions
*/ */
#define RADIUS_MAX_SESSION 100 #define RADIUS_MAX_SESSION 1000
/** /**
* RADIUS_MAX_MSG_LEN - Maximum message length for incoming RADIUS messages * RADIUS_MAX_MSG_LEN - Maximum message length for incoming RADIUS messages
@ -1172,7 +1177,7 @@ send_reply:
sess->sess_id); sess->sess_id);
eloop_cancel_timeout(radius_server_session_remove_timeout, eloop_cancel_timeout(radius_server_session_remove_timeout,
data, sess); data, sess);
eloop_register_timeout(10, 0, eloop_register_timeout(RADIUS_SESSION_MAINTAIN, 0,
radius_server_session_remove_timeout, radius_server_session_remove_timeout,
data, sess); data, sess);
} }