]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Use MLD MAC address in wpa_sm_store_ptk() to support MLO in PTKSA cache
authorAiny Kumari <ainy.kumari@oss.qualcomm.com>
Tue, 27 Jan 2026 10:50:11 +0000 (02:50 -0800)
committerJouni Malinen <j@w1.fi>
Fri, 30 Jan 2026 10:17:56 +0000 (12:17 +0200)
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 <ainy.kumari@oss.qualcomm.com>
src/rsn_supp/wpa.c

index 70812f4b1dd6554ba276779b2fe7dd7fb10d331e..b68e1f46b318ba894e4025368925f2ea7e1f927a 100644 (file)
@@ -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