Use the Basic Multi-Link element in Beacon frames (and Probe Response
frames for that matter) to learn the AP MLD MAC address instead of
having to wait until this address is included in an EAPOL-Key frame.
This is needed for FT protocol (where 4-way handshake is not used) and
it is also convenient to have the MLD MAC address available as soon as
possible to be able to decrypt frames and even to recognize some special
AP vs. STA cases when either the BSSID or the AP MLD MAC address might
be used.
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
bss->mesh = elems->mesh_id != NULL;
+ if (is_zero_ether_addr(bss->mld_mac_addr) &&
+ elems->basic_mle && elems->basic_mle_len >= 2 + 1 + ETH_ALEN &&
+ elems->basic_mle[2] >= 1 + ETH_ALEN) {
+ os_memcpy(bss->mld_mac_addr, &elems->basic_mle[2 + 1],
+ ETH_ALEN);
+ wpa_printf(MSG_DEBUG,
+ "Learned AP MLD MAC Address from Beacon/Probe Response frame: "
+ MACSTR " (BSSID " MACSTR ")",
+ MAC2STR(bss->mld_mac_addr), MAC2STR(bss->bssid));
+ }
+
if (!update)
return;