From: Allen.Ye Date: Thu, 3 Aug 2023 12:33:55 +0000 (+0800) Subject: hostapd: Fix AID assignment in multiple BSSID X-Git-Tag: hostap_2_11~1050 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2763d1d97e66c083b46f359b4c4e0c43c87a1d6f;p=thirdparty%2Fhostap.git hostapd: Fix AID assignment in multiple BSSID 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 --- diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c index d40a821fe..aa02fc624 100644 --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c @@ -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);