aboutsummaryrefslogtreecommitdiffstats
path: root/src/radius
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2016-12-27 10:14:48 (GMT)
committerJouni Malinen <j@w1.fi>2016-12-27 10:14:48 (GMT)
commit35677305896cd3561deaf84ac513258104b67e93 (patch)
tree3ca9358c252fe0e8a2ead7b2c3b930f83316c152 /src/radius
parenta5861afcbd3c464a1d6c90fdb83ecbac1fbfe966 (diff)
downloadhostap-35677305896cd3561deaf84ac513258104b67e93.zip
hostap-35677305896cd3561deaf84ac513258104b67e93.tar.gz
hostap-35677305896cd3561deaf84ac513258104b67e93.tar.bz2
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>
Diffstat (limited to 'src/radius')
-rw-r--r--src/radius/radius_server.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/radius/radius_server.c b/src/radius/radius_server.c
index 744283c..323c409 100644
--- a/src/radius/radius_server.c
+++ b/src/radius/radius_server.c
@@ -26,9 +26,14 @@
#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);
}