]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wlantest: Derive PMK-R1 and PTK using AA/SPA for MLO FT over-the-DS
authorVeerendranath Jakkam <quic_vjakkam@quicinc.com>
Mon, 14 Aug 2023 15:25:08 +0000 (20:55 +0530)
committerJouni Malinen <j@w1.fi>
Thu, 24 Aug 2023 13:42:22 +0000 (16:42 +0300)
Use AP and STA addresses indicated in FT Request/Response frames for
PMK-R1 and PTK derivation instead of the addresses in the BSS and STA
entries. This is needed for MLO to use the MLD MAC address instead of
one of the link addresses.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
wlantest/rx_mgmt.c

index 490816e9f2f7c4700c12ccf6e37b26707f9d8f8a..950a40b2df5d1cd301e8234b7d342c99f579e3aa 100644 (file)
@@ -2135,7 +2135,7 @@ static void rx_mgmt_action_ft_response(struct wlantest *wt,
                os_memcpy(bss->r1kh_id, parse.r1kh_id, FT_R1KH_ID_LEN);
 
        if (wpa_derive_pmk_r1(sta->pmk_r0, sta->pmk_r0_len, sta->pmk_r0_name,
-                             bss->r1kh_id, sta->addr, sta->pmk_r1,
+                             bss->r1kh_id, spa, sta->pmk_r1,
                              sta->pmk_r1_name) < 0)
                return;
        sta->pmk_r1_len = sta->pmk_r0_len;
@@ -2153,7 +2153,7 @@ static void rx_mgmt_action_ft_response(struct wlantest *wt,
                  sizeof(sta->pmk_r1_name));
        if (!parse.fte_anonce || !parse.fte_snonce ||
            wpa_pmk_r1_to_ptk(sta->pmk_r1, sta->pmk_r1_len, parse.fte_snonce,
-                             parse.fte_anonce, new_sta->addr, bss->bssid,
+                             parse.fte_anonce, spa, aa,
                              sta->pmk_r1_name, &ptk, ptk_name,
                              new_sta->key_mgmt, new_sta->pairwise_cipher,
                              0) < 0)