]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wlantest: Find non-AP MLD only from affiliated BSSs of the AP MLD
authorJouni Malinen <quic_jouni@quicinc.com>
Thu, 10 Aug 2023 08:18:57 +0000 (11:18 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 10 Aug 2023 09:14:31 +0000 (12:14 +0300)
Make sta_find_mlo() more accurate by searching a non-AP MLD only from
the affialiated BSSs of the AP MLD instead of from any BSS. This might
help in some roaming cases where both the old and the new AP MLD have
their affiliated links in the BSS table.

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

index 6b5573e3af9edd203dfd76e2733838a7f4178c9d..6a5412e545ccc83ff0d188052947bf7dee012952 100644 (file)
@@ -54,6 +54,10 @@ struct wlantest_sta * sta_find_mlo(struct wlantest *wt,
        dl_list_for_each(obss, &wt->bss, struct wlantest_bss, list) {
                if (obss == bss)
                        continue;
+               if (!is_zero_ether_addr(bss->mld_mac_addr) &&
+                   os_memcmp(obss->mld_mac_addr, bss->mld_mac_addr,
+                             ETH_ALEN) != 0)
+                       continue;
                dl_list_for_each(sta, &obss->sta, struct wlantest_sta, list) {
                        if (os_memcmp(sta->addr, addr, ETH_ALEN) == 0)
                                return sta;