]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
WNM: Allow frames from AP MLD
authorIlan Peer <ilan.peer@intel.com>
Wed, 13 Dec 2023 14:04:06 +0000 (16:04 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 16 Dec 2023 16:49:16 +0000 (18:49 +0200)
Allow frames where the SA is the AP MLD MAC address as the driver might
have performed address translation.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
wpa_supplicant/wnm_sta.c

index 58c6bb45acfb1d24b4d9f7ca5c1d008e0f6fdffa..2cd5edd39c79e8a7fc7f9d6b02b7b470fde2f577 100644 (file)
@@ -1878,7 +1878,9 @@ static void ieee802_11_rx_wnm_notif_req(struct wpa_supplicant *wpa_s,
                    pos, end - pos);
 
        if (wpa_s->wpa_state != WPA_COMPLETED ||
-           os_memcmp(sa, wpa_s->bssid, ETH_ALEN) != 0) {
+           (os_memcmp(sa, wpa_s->bssid, ETH_ALEN) != 0 &&
+            (!wpa_s->valid_links ||
+             os_memcmp(sa, wpa_s->ap_mld_addr, ETH_ALEN) != 0))) {
                wpa_dbg(wpa_s, MSG_DEBUG, "WNM: WNM-Notification frame not "
                        "from our AP - ignore it");
                return;
@@ -1922,7 +1924,9 @@ static void ieee802_11_rx_wnm_coloc_intf_req(struct wpa_supplicant *wpa_s,
                return; /* only nonzero values are used for request */
 
        if (wpa_s->wpa_state != WPA_COMPLETED ||
-           os_memcmp(sa, wpa_s->bssid, ETH_ALEN) != 0) {
+           (os_memcmp(sa, wpa_s->bssid, ETH_ALEN) != 0 &&
+            (!wpa_s->valid_links ||
+             os_memcmp(sa, wpa_s->ap_mld_addr, ETH_ALEN) != 0))) {
                wpa_dbg(wpa_s, MSG_DEBUG,
                        "WNM: Collocated Interference Request frame not from current AP - ignore it");
                return;
@@ -1952,7 +1956,9 @@ void ieee802_11_rx_wnm_action(struct wpa_supplicant *wpa_s,
        wpa_printf(MSG_DEBUG, "WNM: RX action %u from " MACSTR,
                   act, MAC2STR(mgmt->sa));
        if (wpa_s->wpa_state < WPA_ASSOCIATED ||
-           os_memcmp(mgmt->sa, wpa_s->bssid, ETH_ALEN) != 0) {
+           (os_memcmp(mgmt->sa, wpa_s->bssid, ETH_ALEN) != 0 &&
+            (!wpa_s->valid_links ||
+             os_memcmp(mgmt->sa, wpa_s->ap_mld_addr, ETH_ALEN) != 0))) {
                wpa_printf(MSG_DEBUG, "WNM: Ignore unexpected WNM Action "
                           "frame");
                return;