From: Ainy Kumari Date: Tue, 27 Jan 2026 10:50:11 +0000 (-0800) Subject: Use MLD MAC address in wpa_sm_store_ptk() to support MLO in PTKSA cache X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=008c79b6dd1934ec19108fba12630dad163c3cd3;p=thirdparty%2Fhostap.git Use MLD MAC address in wpa_sm_store_ptk() to support MLO in PTKSA cache For MLO connections, the PTK is derived for the MLD and should be associated with the MLD MAC address rather than the per-link BSSID. Update the logic to use the MLD MAC address for MLO and BSSID for non-MLO scenarios, respectively. Signed-off-by: Ainy Kumari --- diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c index 70812f4b1..b68e1f46b 100644 --- a/src/rsn_supp/wpa.c +++ b/src/rsn_supp/wpa.c @@ -1301,7 +1301,7 @@ static int wpa_supplicant_install_ptk(struct wpa_sm *sm, } #endif /* CONFIG_PASN */ - wpa_sm_store_ptk(sm, sm->bssid, sm->pairwise_cipher, + wpa_sm_store_ptk(sm, wpa_sm_get_auth_addr(sm), sm->pairwise_cipher, sm->dot11RSNAConfigPMKLifetime, &sm->ptk); if (key_flag & KEY_FLAG_NEXT) { @@ -7027,7 +7027,7 @@ int fils_process_assoc_resp(struct wpa_sm *sm, const u8 *resp, size_t len) goto fail; } - wpa_sm_store_ptk(sm, sm->bssid, sm->pairwise_cipher, + wpa_sm_store_ptk(sm, wpa_sm_get_auth_addr(sm), sm->pairwise_cipher, sm->dot11RSNAConfigPMKLifetime, &sm->ptk); /* TODO: TK could be cleared after auth frame exchange now that driver