]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wlantest: Use the MLD MAC address as well for matching STA entries
authorJouni Malinen <quic_jouni@quicinc.com>
Thu, 10 Aug 2023 08:34:41 +0000 (11:34 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 10 Aug 2023 09:14:31 +0000 (12:14 +0300)
Allow either a link address or the MLD MAC address of a non-AP MLD to
match the MAC address that is being used to identify a source or
destination of a frame for the MLO cases.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
wlantest/sta.c

index 6a5412e545ccc83ff0d188052947bf7dee012952..f3a538fef810d2f9ffbedb01a8e5f3aeb3ed5d6f 100644 (file)
@@ -38,6 +38,8 @@ struct wlantest_sta * sta_find_mlo(struct wlantest *wt,
        dl_list_for_each(sta, &bss->sta, struct wlantest_sta, list) {
                if (os_memcmp(sta->addr, addr, ETH_ALEN) == 0)
                        return sta;
+               if (os_memcmp(sta->mld_mac_addr, addr, ETH_ALEN) == 0)
+                       return sta;
        }
 
        if (is_zero_ether_addr(addr))
@@ -61,6 +63,8 @@ struct wlantest_sta * sta_find_mlo(struct wlantest *wt,
                dl_list_for_each(sta, &obss->sta, struct wlantest_sta, list) {
                        if (os_memcmp(sta->addr, addr, ETH_ALEN) == 0)
                                return sta;
+                       if (os_memcmp(sta->mld_mac_addr, addr, ETH_ALEN) == 0)
+                               return sta;
                        for (link_id = 0; link_id < MAX_NUM_MLO_LINKS;
                             link_id++) {
                                if (os_memcmp(sta->link_addr[link_id], addr,