MLD STA: Use MLD MAC address as destination for EAPOL-Key request
Also this EAPOL frame uses the MLD MAC address of the AP MLD when sent during an MLO association. Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
parent
c92311fed7
commit
cc1867f5ca
1 changed files with 3 additions and 9 deletions
|
@ -222,7 +222,7 @@ void wpa_sm_key_request(struct wpa_sm *sm, int error, int pairwise)
|
||||||
size_t mic_len, hdrlen, rlen;
|
size_t mic_len, hdrlen, rlen;
|
||||||
struct wpa_eapol_key *reply;
|
struct wpa_eapol_key *reply;
|
||||||
int key_info, ver;
|
int key_info, ver;
|
||||||
u8 bssid[ETH_ALEN], *rbuf, *key_mic, *mic;
|
u8 *rbuf, *key_mic, *mic;
|
||||||
|
|
||||||
if (pairwise && sm->wpa_deny_ptk0_rekey && !sm->use_ext_key_id &&
|
if (pairwise && sm->wpa_deny_ptk0_rekey && !sm->use_ext_key_id &&
|
||||||
wpa_sm_get_state(sm) == WPA_COMPLETED && !error) {
|
wpa_sm_get_state(sm) == WPA_COMPLETED && !error) {
|
||||||
|
@ -242,12 +242,6 @@ void wpa_sm_key_request(struct wpa_sm *sm, int error, int pairwise)
|
||||||
else
|
else
|
||||||
ver = WPA_KEY_INFO_TYPE_HMAC_MD5_RC4;
|
ver = WPA_KEY_INFO_TYPE_HMAC_MD5_RC4;
|
||||||
|
|
||||||
if (wpa_sm_get_bssid(sm, bssid) < 0) {
|
|
||||||
wpa_msg(sm->ctx->msg_ctx, MSG_WARNING,
|
|
||||||
"Failed to read BSSID for EAPOL-Key request");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
mic_len = wpa_mic_len(sm->key_mgmt, sm->pmk_len);
|
mic_len = wpa_mic_len(sm->key_mgmt, sm->pmk_len);
|
||||||
hdrlen = sizeof(*reply) + mic_len + 2;
|
hdrlen = sizeof(*reply) + mic_len + 2;
|
||||||
rbuf = wpa_sm_alloc_eapol(sm, IEEE802_1X_TYPE_EAPOL_KEY, NULL,
|
rbuf = wpa_sm_alloc_eapol(sm, IEEE802_1X_TYPE_EAPOL_KEY, NULL,
|
||||||
|
@ -284,8 +278,8 @@ void wpa_sm_key_request(struct wpa_sm *sm, int error, int pairwise)
|
||||||
"WPA: Sending EAPOL-Key Request (error=%d "
|
"WPA: Sending EAPOL-Key Request (error=%d "
|
||||||
"pairwise=%d ptk_set=%d len=%lu)",
|
"pairwise=%d ptk_set=%d len=%lu)",
|
||||||
error, pairwise, sm->ptk_set, (unsigned long) rlen);
|
error, pairwise, sm->ptk_set, (unsigned long) rlen);
|
||||||
wpa_eapol_key_send(sm, &sm->ptk, ver, bssid, ETH_P_EAPOL, rbuf, rlen,
|
wpa_eapol_key_send(sm, &sm->ptk, ver, wpa_sm_get_auth_addr(sm),
|
||||||
key_mic);
|
ETH_P_EAPOL, rbuf, rlen, key_mic);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue