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 <quic_vjakkam@quicinc.com>
This commit is contained in:
Veerendranath Jakkam 2023-08-14 20:55:08 +05:30 committed by Jouni Malinen
parent 9318db7c38
commit 628b9f1022

View 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)