Re-initialize EAP ClientTimeout on for each session
ClientTimeout changes from EAP peer methods were not supposed to change behavior for other EAP peer methods or even other sessions of the same method. Re-initialize ClientTimeout whenever an EAP peer method is initialized to avoid this. This addresses problems where WPS (EAP-WSC) reduces the timeout and consecutive EAP runs may fail due to too small timeout.
This commit is contained in:
parent
9dac8c3eaf
commit
d3e01b9d71
1 changed files with 4 additions and 1 deletions
|
@ -37,6 +37,7 @@
|
|||
#define STATE_MACHINE_DEBUG_PREFIX "EAP"
|
||||
|
||||
#define EAP_MAX_AUTH_ROUNDS 50
|
||||
#define EAP_CLIENT_TIMEOUT_DEFAULT 60
|
||||
|
||||
|
||||
static Boolean eap_sm_allowMethod(struct eap_sm *sm, int vendor,
|
||||
|
@ -268,6 +269,8 @@ SM_STATE(EAP, GET_METHOD)
|
|||
goto nak;
|
||||
}
|
||||
|
||||
sm->ClientTimeout = EAP_CLIENT_TIMEOUT_DEFAULT;
|
||||
|
||||
wpa_printf(MSG_DEBUG, "EAP: Initialize selected EAP method: "
|
||||
"vendor %u method %u (%s)",
|
||||
sm->reqVendor, method, sm->m->name);
|
||||
|
@ -1241,7 +1244,7 @@ struct eap_sm * eap_peer_sm_init(void *eapol_ctx,
|
|||
sm->eapol_ctx = eapol_ctx;
|
||||
sm->eapol_cb = eapol_cb;
|
||||
sm->msg_ctx = msg_ctx;
|
||||
sm->ClientTimeout = 60;
|
||||
sm->ClientTimeout = EAP_CLIENT_TIMEOUT_DEFAULT;
|
||||
sm->wps = conf->wps;
|
||||
|
||||
os_memset(&tlsconf, 0, sizeof(tlsconf));
|
||||
|
|
Loading…
Reference in a new issue