@@ -620,7 +620,7 @@ static int wpa_derive_ptk(struct wpa_sm *sm, const unsigned char *src_addr,
kdk_len = 0;
ret = wpa_pmk_to_ptk(sm->pmk, sm->pmk_len, "Pairwise key expansion",
- sm->own_addr, sm->bssid, sm->snonce,
+ sm->own_addr, wpa_sm_get_auth_addr(sm), sm->snonce,
key->key_nonce, ptk, akmp,
sm->pairwise_cipher, z, z_len,
kdk_len);
@@ -4253,6 +4253,12 @@ unsigned int wpa_sm_get_key_mgmt(struct wpa_sm *sm)
}
+const u8 * wpa_sm_get_auth_addr(struct wpa_sm *sm)
+{
+ return sm->mlo.setup_links ? sm->mlo.ap_mld_addr : sm->bssid;
+}
+
+
#ifdef CONFIG_FILS
struct wpabuf * fils_build_auth(struct wpa_sm *sm, int dh_group, const u8 *md)
@@ -576,5 +576,6 @@ void wpa_sm_set_dpp_z(struct wpa_sm *sm, const struct wpabuf *z);
void wpa_pasn_pmksa_cache_add(struct wpa_sm *sm, const u8 *pmk, size_t pmk_len,
const u8 *pmkid, const u8 *bssid, int key_mgmt);
void wpa_pasn_sm_set_caps(struct wpa_sm *sm, unsigned int flags2);
+const u8 * wpa_sm_get_auth_addr(struct wpa_sm *sm);
#endif /* WPA_H */
@@ -77,7 +77,7 @@ int wpa_derive_ptk_ft(struct wpa_sm *sm, const unsigned char *src_addr,
kdk_len = 0;
ret = wpa_pmk_r1_to_ptk(sm->pmk_r1, sm->pmk_r1_len, sm->snonce,
- anonce, sm->own_addr, sm->bssid,
+ anonce, sm->own_addr, wpa_sm_get_auth_addr(sm),
sm->pmk_r1_name, ptk, ptk_name, sm->key_mgmt,
sm->pairwise_cipher, kdk_len);
if (ret) {