AP MLD: Do not store per-supplicant AP MLD MAC address information
There is no need to store the AP MLD MAC address within per-supplicant data structure in struct wpa_state_machine since that MLD MAC address is available from the generic authenticator data in struct wpa_authenticator. Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
parent
ed78f56dce
commit
3b68eef7d7
5 changed files with 8 additions and 11 deletions
|
@ -517,7 +517,7 @@ int hostapd_notif_assoc(struct hostapd_data *hapd, const u8 *addr,
|
||||||
if (ap_sta_is_mld(hapd, sta)) {
|
if (ap_sta_is_mld(hapd, sta)) {
|
||||||
wpa_printf(MSG_DEBUG,
|
wpa_printf(MSG_DEBUG,
|
||||||
"MLD: Set ML info in RSN Authenticator");
|
"MLD: Set ML info in RSN Authenticator");
|
||||||
wpa_auth_set_ml_info(sta->wpa_sm, hapd->mld->mld_addr,
|
wpa_auth_set_ml_info(sta->wpa_sm,
|
||||||
sta->mld_assoc_link_id,
|
sta->mld_assoc_link_id,
|
||||||
&sta->mld_info);
|
&sta->mld_info);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3763,7 +3763,7 @@ u16 owe_process_rsn_ie(struct hostapd_data *hapd,
|
||||||
}
|
}
|
||||||
#ifdef CONFIG_IEEE80211BE
|
#ifdef CONFIG_IEEE80211BE
|
||||||
if (ap_sta_is_mld(hapd, sta))
|
if (ap_sta_is_mld(hapd, sta))
|
||||||
wpa_auth_set_ml_info(sta->wpa_sm, hapd->mld->mld_addr,
|
wpa_auth_set_ml_info(sta->wpa_sm,
|
||||||
sta->mld_assoc_link_id, &sta->mld_info);
|
sta->mld_assoc_link_id, &sta->mld_info);
|
||||||
#endif /* CONFIG_IEEE80211BE */
|
#endif /* CONFIG_IEEE80211BE */
|
||||||
rsn_ie -= 2;
|
rsn_ie -= 2;
|
||||||
|
@ -4056,7 +4056,6 @@ static int __check_assoc_ies(struct hostapd_data *hapd, struct sta_info *sta,
|
||||||
"MLD: %s ML info in RSN Authenticator",
|
"MLD: %s ML info in RSN Authenticator",
|
||||||
init ? "Set" : "Reset");
|
init ? "Set" : "Reset");
|
||||||
wpa_auth_set_ml_info(sta->wpa_sm,
|
wpa_auth_set_ml_info(sta->wpa_sm,
|
||||||
hapd->mld->mld_addr,
|
|
||||||
sta->mld_assoc_link_id,
|
sta->mld_assoc_link_id,
|
||||||
info);
|
info);
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,7 +90,7 @@ static const u8 * wpa_auth_get_aa(const struct wpa_state_machine *sm)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_IEEE80211BE
|
#ifdef CONFIG_IEEE80211BE
|
||||||
if (sm->mld_assoc_link_id >= 0)
|
if (sm->mld_assoc_link_id >= 0)
|
||||||
return sm->own_mld_addr;
|
return sm->wpa_auth->mld_addr;
|
||||||
#endif /* CONFIG_IEEE80211BE */
|
#endif /* CONFIG_IEEE80211BE */
|
||||||
return sm->wpa_auth->addr;
|
return sm->wpa_auth->addr;
|
||||||
}
|
}
|
||||||
|
@ -2806,7 +2806,7 @@ SM_STATE(WPA_PTK, PTKSTART)
|
||||||
"RSN: MLD: Add MAC Address KDE: kde_len=%zu",
|
"RSN: MLD: Add MAC Address KDE: kde_len=%zu",
|
||||||
kde_len);
|
kde_len);
|
||||||
wpa_add_kde(buf + kde_len, RSN_KEY_DATA_MAC_ADDR,
|
wpa_add_kde(buf + kde_len, RSN_KEY_DATA_MAC_ADDR,
|
||||||
sm->own_mld_addr, ETH_ALEN, NULL, 0);
|
sm->wpa_auth->mld_addr, ETH_ALEN, NULL, 0);
|
||||||
kde_len += 2 + RSN_SELECTOR_LEN + ETH_ALEN;
|
kde_len += 2 + RSN_SELECTOR_LEN + ETH_ALEN;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_IEEE80211BE */
|
#endif /* CONFIG_IEEE80211BE */
|
||||||
|
@ -4441,7 +4441,7 @@ static u8 * wpa_auth_ml_kdes(struct wpa_state_machine *sm, u8 *pos)
|
||||||
|
|
||||||
wpa_printf(MSG_DEBUG, "RSN: MLD: Adding MAC Address KDE");
|
wpa_printf(MSG_DEBUG, "RSN: MLD: Adding MAC Address KDE");
|
||||||
pos = wpa_add_kde(pos, RSN_KEY_DATA_MAC_ADDR,
|
pos = wpa_add_kde(pos, RSN_KEY_DATA_MAC_ADDR,
|
||||||
sm->own_mld_addr, ETH_ALEN, NULL, 0);
|
sm->wpa_auth->mld_addr, ETH_ALEN, NULL, 0);
|
||||||
|
|
||||||
for (link_id = 0; link_id < MAX_NUM_MLD_LINKS; link_id++) {
|
for (link_id = 0; link_id < MAX_NUM_MLD_LINKS; link_id++) {
|
||||||
if (!sm->mld_links[link_id].valid)
|
if (!sm->mld_links[link_id].valid)
|
||||||
|
@ -7114,7 +7114,7 @@ void wpa_auth_sta_radius_psk_resp(struct wpa_state_machine *sm, bool success)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void wpa_auth_set_ml_info(struct wpa_state_machine *sm, const u8 *mld_addr,
|
void wpa_auth_set_ml_info(struct wpa_state_machine *sm,
|
||||||
u8 mld_assoc_link_id, struct mld_info *info)
|
u8 mld_assoc_link_id, struct mld_info *info)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_IEEE80211BE
|
#ifdef CONFIG_IEEE80211BE
|
||||||
|
@ -7130,7 +7130,6 @@ void wpa_auth_set_ml_info(struct wpa_state_machine *sm, const u8 *mld_addr,
|
||||||
wpa_auth_logger(sm->wpa_auth, wpa_auth_get_spa(sm), LOGGER_DEBUG,
|
wpa_auth_logger(sm->wpa_auth, wpa_auth_get_spa(sm), LOGGER_DEBUG,
|
||||||
"MLD: Initialization");
|
"MLD: Initialization");
|
||||||
|
|
||||||
os_memcpy(sm->own_mld_addr, mld_addr, ETH_ALEN);
|
|
||||||
os_memcpy(sm->peer_mld_addr, info->common_info.mld_addr, ETH_ALEN);
|
os_memcpy(sm->peer_mld_addr, info->common_info.mld_addr, ETH_ALEN);
|
||||||
|
|
||||||
sm->mld_assoc_link_id = mld_assoc_link_id;
|
sm->mld_assoc_link_id = mld_assoc_link_id;
|
||||||
|
@ -7176,7 +7175,7 @@ void wpa_auth_set_ml_info(struct wpa_state_machine *sm, const u8 *mld_addr,
|
||||||
wpa_printf(MSG_ERROR,
|
wpa_printf(MSG_ERROR,
|
||||||
"Unable to find authenticator object for ML STA "
|
"Unable to find authenticator object for ML STA "
|
||||||
MACSTR " on link " MACSTR " link id %d",
|
MACSTR " on link " MACSTR " link id %d",
|
||||||
MAC2STR(sm->own_mld_addr),
|
MAC2STR(sm->wpa_auth->mld_addr),
|
||||||
MAC2STR(sm_link->own_addr),
|
MAC2STR(sm_link->own_addr),
|
||||||
link_id);
|
link_id);
|
||||||
}
|
}
|
||||||
|
|
|
@ -646,7 +646,7 @@ void wpa_auth_set_ocv_override_freq(struct wpa_authenticator *wpa_auth,
|
||||||
|
|
||||||
void wpa_auth_sta_radius_psk_resp(struct wpa_state_machine *sm, bool success);
|
void wpa_auth_sta_radius_psk_resp(struct wpa_state_machine *sm, bool success);
|
||||||
|
|
||||||
void wpa_auth_set_ml_info(struct wpa_state_machine *sm, const u8 *mld_addr,
|
void wpa_auth_set_ml_info(struct wpa_state_machine *sm,
|
||||||
u8 mld_assoc_link_id, struct mld_info *info);
|
u8 mld_assoc_link_id, struct mld_info *info);
|
||||||
void wpa_auth_ml_get_rsn_info(struct wpa_authenticator *a,
|
void wpa_auth_ml_get_rsn_info(struct wpa_authenticator *a,
|
||||||
struct wpa_auth_ml_link_rsn_info *info);
|
struct wpa_auth_ml_link_rsn_info *info);
|
||||||
|
|
|
@ -172,7 +172,6 @@ struct wpa_state_machine {
|
||||||
#endif /* CONFIG_TESTING_OPTIONS */
|
#endif /* CONFIG_TESTING_OPTIONS */
|
||||||
|
|
||||||
#ifdef CONFIG_IEEE80211BE
|
#ifdef CONFIG_IEEE80211BE
|
||||||
u8 own_mld_addr[ETH_ALEN];
|
|
||||||
u8 peer_mld_addr[ETH_ALEN];
|
u8 peer_mld_addr[ETH_ALEN];
|
||||||
s8 mld_assoc_link_id;
|
s8 mld_assoc_link_id;
|
||||||
u8 n_mld_affiliated_links;
|
u8 n_mld_affiliated_links;
|
||||||
|
|
Loading…
Add table
Reference in a new issue