]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
More consistent SA check for unexpected Data frames
authorJouni Malinen <j@w1.fi>
Wed, 11 Sep 2019 13:01:57 +0000 (16:01 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 17 Sep 2019 09:38:15 +0000 (12:38 +0300)
Use the same rules for dropping driver notifications for Data frames
from unassociated stations as were added for Management frame reception.
This results in more consistent behavior in sending out Deauthentication
frames with Reason Code 6/7.

This case was already checking for unexpected multicast addresses, so
there was no issue for the PMF protections for unexpected disconnection.
Anyway, better avoid unnecessary Deauthentication frames consistently.

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

index 2c43ab1ab1f892aa0447e4fe7ef88386cfbc7169..2ef490b8bfb911c7d4364309c872c22dc969d8ac 100644 (file)
@@ -5248,8 +5248,10 @@ 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 (is_multicast_ether_addr(src)) {
-               /* Broadcast bit set in SA?! Ignore the frame silently. */
+       if (is_multicast_ether_addr(src) || is_zero_ether_addr(src) ||
+           os_memcmp(src, hapd->own_addr, ETH_ALEN) == 0) {
+               /* Broadcast bit set in SA or unexpected SA?! Ignore the frame
+                * silently. */
                return;
        }