diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c index ffc38ae9a..4d8dd2506 100644 --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c @@ -1103,6 +1103,7 @@ static void handle_assoc(struct hostapd_data *hapd, "association OK (aid %d)", sta->aid); /* Station will be marked associated, after it acknowledges AssocResp */ + sta->flags |= WLAN_STA_ASSOC_REQ_OK; #ifdef CONFIG_IEEE80211W if ((sta->flags & WLAN_STA_MFP) && sta->sa_query_timed_out) { @@ -1159,7 +1160,7 @@ static void handle_disassoc(struct hostapd_data *hapd, return; } - sta->flags &= ~WLAN_STA_ASSOC; + sta->flags &= ~(WLAN_STA_ASSOC | WLAN_STA_ASSOC_REQ_OK); wpa_msg(hapd->msg_ctx, MSG_INFO, AP_STA_DISCONNECTED MACSTR, MAC2STR(sta->addr)); wpa_auth_sm_event(sta->wpa_sm, WPA_DISASSOC); @@ -1209,7 +1210,8 @@ static void handle_deauth(struct hostapd_data *hapd, return; } - sta->flags &= ~(WLAN_STA_AUTH | WLAN_STA_ASSOC); + sta->flags &= ~(WLAN_STA_AUTH | WLAN_STA_ASSOC | + WLAN_STA_ASSOC_REQ_OK); wpa_msg(hapd->msg_ctx, MSG_INFO, AP_STA_DISCONNECTED MACSTR, MAC2STR(sta->addr)); wpa_auth_sm_event(sta->wpa_sm, WPA_DEAUTH); @@ -1858,6 +1860,14 @@ void ieee802_11_rx_from_unknown(struct hostapd_data *hapd, const u8 *src, return; } + if (sta && (sta->flags & WLAN_STA_ASSOC_REQ_OK)) { + wpa_printf(MSG_DEBUG, "Association Response to the STA has " + "already been sent, but no TX status yet known - " + "ignore Class 3 frame issue with " MACSTR, + MAC2STR(src)); + return; + } + if (sta && (sta->flags & WLAN_STA_AUTH)) hostapd_drv_sta_disassoc( hapd, src, diff --git a/src/ap/sta_info.h b/src/ap/sta_info.h index c22f25301..9ec4fe33e 100644 --- a/src/ap/sta_info.h +++ b/src/ap/sta_info.h @@ -31,6 +31,7 @@ #define WLAN_STA_WPS BIT(12) #define WLAN_STA_MAYBE_WPS BIT(13) #define WLAN_STA_WDS BIT(14) +#define WLAN_STA_ASSOC_REQ_OK BIT(15) #define WLAN_STA_NONERP BIT(31) /* Maximum number of supported rates (from both Supported Rates and Extended