]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
RADIUS server: Increase maximum number of sessions
authorJouni Malinen <j@w1.fi>
Tue, 27 Dec 2016 10:14:48 +0000 (12:14 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 27 Dec 2016 10:14:48 +0000 (12:14 +0200)
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>
src/radius/radius_server.c

index 744283c7dc9d739535e7f1c948205ec6adfee225..323c409c85532b881fe9facff8b5a6ce196818bd 100644 (file)
  */
 #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);
        }