From 35677305896cd3561deaf84ac513258104b67e93 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Tue, 27 Dec 2016 12:14:48 +0200 Subject: [PATCH] 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 --- src/radius/radius_server.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/radius/radius_server.c b/src/radius/radius_server.c index 744283c7d..323c409c8 100644 --- a/src/radius/radius_server.c +++ b/src/radius/radius_server.c @@ -25,10 +25,15 @@ */ #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 */ -#define RADIUS_MAX_SESSION 100 +#define RADIUS_MAX_SESSION 1000 /** * RADIUS_MAX_MSG_LEN - Maximum message length for incoming RADIUS messages @@ -1172,7 +1177,7 @@ send_reply: sess->sess_id); eloop_cancel_timeout(radius_server_session_remove_timeout, data, sess); - eloop_register_timeout(10, 0, + eloop_register_timeout(RADIUS_SESSION_MAINTAIN, 0, radius_server_session_remove_timeout, data, sess); }