]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AP MLD: Mark STA as MLD before checking association IEs
authorChenming Huang <quic_chenhuan@quicinc.com>
Wed, 26 Feb 2025 14:32:24 +0000 (20:02 +0530)
committerJouni Malinen <j@w1.fi>
Thu, 27 Feb 2025 10:11:44 +0000 (12:11 +0200)
In __check_assoc_ies(), ap_sta_is_mld() is already being used to
determine whether a peer is an MLD or not. However, when calling
__check_assoc_ies() from ieee80211_ml_process_link(),
ap_sta_set_mld() is not yet called. So inside __check_assoc_ies()
the sta entry is treated as non-MLD, which leads to wrongly
fetching PMKSA entry from regular pmksa entry list instead of
ml_pmksa. That results in a connection failure.

Move ap_sta_set_mld() to be used earlier since we already know it is an
MLD peer at that point.

Signed-off-by: Chenming Huang <quic_chenhuan@quicinc.com>
src/ap/ieee802_11.c

index 172a9a12a5eae367a615a4f0fa10ca71981b607a..523e0a32219ee3522a2e289c552a90713232b2d0 100644 (file)
@@ -4816,6 +4816,7 @@ static int ieee80211_ml_process_link(struct hostapd_data *hapd,
 
        sta->flags |= origin_sta->flags | WLAN_STA_ASSOC_REQ_OK;
        sta->mld_assoc_link_id = origin_sta->mld_assoc_link_id;
+       ap_sta_set_mld(sta, true);
 
        status = __check_assoc_ies(hapd, sta, NULL, 0, &elems, reassoc, true);
        if (status != WLAN_STATUS_SUCCESS) {
@@ -4823,8 +4824,6 @@ static int ieee80211_ml_process_link(struct hostapd_data *hapd,
                goto out;
        }
 
-       ap_sta_set_mld(sta, true);
-
        os_memcpy(&sta->mld_info, &origin_sta->mld_info, sizeof(sta->mld_info));
        for (i = 0; i < MAX_NUM_MLD_LINKS; i++) {
                struct mld_link_info *li = &sta->mld_info.links[i];