mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-18 02:44:03 -05:00
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
@ -1274,6 +1274,24 @@ int wpa_auth_sm_event(struct wpa_state_machine *sm, wpa_event event)
|
|||||||
break;
|
break;
|
||||||
case WPA_REAUTH:
|
case WPA_REAUTH:
|
||||||
case WPA_REAUTH_EAPOL:
|
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) {
|
if (sm->GUpdateStationKeys) {
|
||||||
/*
|
/*
|
||||||
* Reauthentication cancels the pending group key
|
* Reauthentication cancels the pending group key
|
||||||
|
Loading…
Reference in New Issue
Block a user