Do not send Deauth/Disassoc to unknown STA if SA is invalid
authorJouni Malinen <j@w1.fi>
Sun, 5 Dec 2010 01:40:36 +0000 (17:40 -0800)
committerJouni Malinen <j@w1.fi>
Sun, 5 Dec 2010 01:40:36 +0000 (17:40 -0800)
The frame needs to be sent from an individual (non-group) address,
so drop invalid frames before sending Deauth/Disassoc frames to
not associated STAs.

src/ap/ieee802_11.c

index ae71524..94898cc 100644 (file)
@@ -1804,6 +1804,11 @@ void ieee802_11_rx_from_unknown(struct hostapd_data *hapd, const u8 *src,
 
        wpa_printf(MSG_DEBUG, "Data/PS-poll frame from not associated STA "
                   MACSTR, MAC2STR(src));
+       if (src[0] & 0x01) {
+               /* Broadcast bit set in SA?! Ignore the frame silently. */
+               return;
+       }
+
        if (sta && (sta->flags & WLAN_STA_AUTH))
                hostapd_drv_sta_disassoc(
                        hapd, src,