]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AP MLD: Fix station lookup in hostapd_ml_get_assoc_sta()
authorIlan Peer <ilan.peer@intel.com>
Mon, 25 Dec 2023 17:42:59 +0000 (19:42 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 13 Jan 2024 20:17:21 +0000 (22:17 +0200)
If the station is not an MLO station do not attempt to find the
association station and return false in the ML specific disconnection
processing.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
src/ap/ieee802_11.c

index 948e46b5deb15b9c5619c34715d48338b3b63bf0..e114c83c4caac2b84821bd91d0f90744c5f8940c 100644 (file)
@@ -5739,6 +5739,9 @@ hostapd_ml_get_assoc_sta(struct hostapd_data *hapd, struct sta_info *sta,
        struct hostapd_data *other_hapd = NULL;
        struct sta_info *tmp_sta;
 
+       if (!sta->mld_info.mld_sta)
+               return NULL;
+
        *assoc_hapd = hapd;
 
        /* The station is the one on which the association was performed */
@@ -5787,6 +5790,8 @@ static bool hostapd_ml_handle_disconnect(struct hostapd_data *hapd,
         * the information about all the other links.
         */
        assoc_sta = hostapd_ml_get_assoc_sta(hapd, sta, &assoc_hapd);
+       if (!assoc_sta)
+               return false;
 
        for (link_id = 0; link_id < MAX_NUM_MLD_LINKS; link_id++) {
                for (i = 0; i < assoc_hapd->iface->interfaces->count; i++) {