From 628b9f10223dfd1d0cd189dee5fca157f1f52416 Mon Sep 17 00:00:00 2001 From: Veerendranath Jakkam Date: Mon, 14 Aug 2023 20:55:08 +0530 Subject: [PATCH] wlantest: Derive PMK-R1 and PTK using AA/SPA for MLO FT over-the-DS 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 --- wlantest/rx_mgmt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wlantest/rx_mgmt.c b/wlantest/rx_mgmt.c index 490816e9f..950a40b2d 100644 --- a/wlantest/rx_mgmt.c +++ b/wlantest/rx_mgmt.c @@ -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)