nl80211: Clear ignore_next_local_deauth and ignore_deauth_event
The authentication flow in wpa_driver_nl80211_authenticate() can result in a locally generated de-authentication, in which both next_local_deauth and ignore_next_local_deauth are set. However, in mlme_event_deauth_disassoc(), when ignore_deauth_event is set, the flag is cleared, but the flow immediately returns leaving ignore_next_local_deauth set, which can result in ignoring future deauth event from the driver, leaving the wpa_supplicant in an inconsistent state. Fix this by clearing both flags in case that next_local_deauth is set. Signed-off-by: Sara Sharon <sara.sharon@intel.com>
This commit is contained in:
parent
fe5aa8cb9c
commit
cb2a926df8
1 changed files with 4 additions and 2 deletions
|
@ -691,13 +691,15 @@ static void mlme_event_deauth_disassoc(struct wpa_driver_nl80211_data *drv,
|
|||
mgmt->u.disassoc.variable;
|
||||
}
|
||||
} else {
|
||||
event.deauth_info.locally_generated =
|
||||
!os_memcmp(mgmt->sa, drv->first_bss->addr, ETH_ALEN);
|
||||
if (drv->ignore_deauth_event) {
|
||||
wpa_printf(MSG_DEBUG, "nl80211: Ignore deauth event due to previous forced deauth-during-auth");
|
||||
drv->ignore_deauth_event = 0;
|
||||
if (event.deauth_info.locally_generated)
|
||||
drv->ignore_next_local_deauth = 0;
|
||||
return;
|
||||
}
|
||||
event.deauth_info.locally_generated =
|
||||
!os_memcmp(mgmt->sa, drv->first_bss->addr, ETH_ALEN);
|
||||
if (drv->ignore_next_local_deauth) {
|
||||
drv->ignore_next_local_deauth = 0;
|
||||
if (event.deauth_info.locally_generated) {
|
||||
|
|
Loading…
Reference in a new issue