From 631739b3610557f6622ef5bf62a09d0b5dfc12db Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 29 Nov 2014 13:31:54 +0200 Subject: [PATCH] Clear WLAN_STA_ASSOC_REQ_OK on AP-initiated deauthentication 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 --- src/ap/sta_info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ap/sta_info.c b/src/ap/sta_info.c index 059eda9c2..02d662603 100644 --- a/src/ap/sta_info.c +++ b/src/ap/sta_info.c @@ -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 "