Clear WLAN_STA_ASSOC_REQ_OK on AP-initiated deauthentication
authorJouni Malinen <j@w1.fi>
Sat, 29 Nov 2014 11:31:54 +0000 (13:31 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 29 Nov 2014 11:31:54 +0000 (13:31 +0200)
This flag was left in the STA entry for the short duration after the STA
gets deauthenticated. If the STA sends a Class 2 or 3 frame during that
short time, the AP would not have replied with Deauthentication frame
indicating no association is present.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/ap/sta_info.c

index 059eda9..02d6626 100644 (file)
@@ -719,7 +719,7 @@ void ap_sta_deauthenticate(struct hostapd_data *hapd, struct sta_info *sta,
        wpa_printf(MSG_DEBUG, "%s: deauthenticate STA " MACSTR,
                   hapd->conf->iface, MAC2STR(sta->addr));
        sta->last_seq_ctrl = WLAN_INVALID_MGMT_SEQ;
-       sta->flags &= ~(WLAN_STA_AUTH | WLAN_STA_ASSOC);
+       sta->flags &= ~(WLAN_STA_AUTH | WLAN_STA_ASSOC | WLAN_STA_ASSOC_REQ_OK);
        ap_sta_set_authorized(hapd, sta, 0);
        sta->timeout_next = STA_REMOVE;
        wpa_printf(MSG_DEBUG, "%s: reschedule ap_handle_timer timeout "