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 <allen.ye@mediatek.com>
This commit is contained in:
Allen.Ye 2023-08-03 20:33:55 +08:00 committed by Jouni Malinen
parent bc0636841a
commit 2763d1d97e

View 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);