]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
hostapd: Fix AID assignment in multiple BSSID
authorAllen.Ye <allen.ye@mediatek.com>
Thu, 3 Aug 2023 12:33:55 +0000 (20:33 +0800)
committerJouni Malinen <j@w1.fi>
Fri, 11 Aug 2023 09:04:59 +0000 (12:04 +0300)
When STAs connect to transmitted BSS and nontransmitted BSS, the
AP should assign the aIDs from the same pool.

Use the transmitted BSS AID pool to assign AIDs when the AP enables
multiple BSSID.

Signed-off-by: Allen.Ye <allen.ye@mediatek.com>
src/ap/ieee802_11.c

index d40a821fe64c50cb9d740f4aa8f68041c8a0cf93..aa02fc624b03480b3b63bd178587ccc5f3f21969 100644 (file)
@@ -3312,6 +3312,11 @@ int hostapd_get_aid(struct hostapd_data *hapd, struct sta_info *sta)
 {
        int i, j = 32, aid;
 
+       /* Transmitted and non-transmitted BSSIDs share the same AID pool, so
+        * use the shared storage in the transmitted BSS to find the next
+        * available value. */
+       hapd = hostapd_mbssid_get_tx_bss(hapd);
+
        /* get a unique AID */
        if (sta->aid > 0) {
                wpa_printf(MSG_DEBUG, "  old AID %d", sta->aid);