]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wlantest: Search SPA using MLO aware find for FT Request/Response frame
authorJouni Malinen <quic_jouni@quicinc.com>
Thu, 24 Aug 2023 13:57:40 +0000 (16:57 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 24 Aug 2023 15:10:47 +0000 (18:10 +0300)
This is needed to be able to find a previously added STA entry when
roaming using FT over-the-DS back to an AP MLD that was used previously.

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

index f0b66107614a4574e114f1f4d495db3df348ffd4..d37440a964ed7cf6d5ade37e320e03b7cd2ed7ad 100644 (file)
@@ -2108,7 +2108,9 @@ static void rx_mgmt_action_ft_request(struct wlantest *wt,
                return;
        }
 
-       sta = sta_get(bss, spa);
+       sta = sta_find_mlo(wt, bss, spa);
+       if (!sta)
+               sta = sta_get(bss, spa);
        if (!sta)
                return;
 
@@ -2177,7 +2179,9 @@ static void rx_mgmt_action_ft_response(struct wlantest *wt,
                return;
        sta->pmk_r1_len = sta->pmk_r0_len;
 
-       new_sta = sta_get(bss, spa);
+       new_sta = sta_find_mlo(wt, bss, spa);
+       if (!new_sta)
+               new_sta = sta_get(bss, spa);
        if (!new_sta)
                return;
        os_memcpy(new_sta->pmk_r0, sta->pmk_r0, sta->pmk_r0_len);