Fix WPA state machine initialization on WPA_REAUTH if needed
When using WPS, we may end up here if the STA manages to re-associate without the previous STA entry getting removed. Consequently, we need to make sure that the WPA state machines gets initialized properly at this point.
This commit is contained in:
parent
fb2ab5dd6a
commit
3ab72b626b
1 changed files with 18 additions and 0 deletions
|
@ -1274,6 +1274,24 @@ int wpa_auth_sm_event(struct wpa_state_machine *sm, wpa_event event)
|
|||
break;
|
||||
case WPA_REAUTH:
|
||||
case WPA_REAUTH_EAPOL:
|
||||
if (!sm->started) {
|
||||
/*
|
||||
* When using WPS, we may end up here if the STA
|
||||
* manages to re-associate without the previous STA
|
||||
* entry getting removed. Consequently, we need to make
|
||||
* sure that the WPA state machines gets initialized
|
||||
* properly at this point.
|
||||
*/
|
||||
wpa_printf(MSG_DEBUG, "WPA state machine had not been "
|
||||
"started - initialize now");
|
||||
sm->started = 1;
|
||||
sm->Init = TRUE;
|
||||
if (wpa_sm_step(sm) == 1)
|
||||
return 1; /* should not really happen */
|
||||
sm->Init = FALSE;
|
||||
sm->AuthenticationRequest = TRUE;
|
||||
break;
|
||||
}
|
||||
if (sm->GUpdateStationKeys) {
|
||||
/*
|
||||
* Reauthentication cancels the pending group key
|
||||
|
|
Loading…
Reference in a new issue