Check AID availability before handling HT state updates on association
This commit is contained in:
parent
df84268ae7
commit
2a3c6f5077
1 changed files with 6 additions and 6 deletions
|
@ -1045,6 +1045,12 @@ static void handle_assoc(struct hostapd_data *hapd,
|
|||
ieee802_11_set_beacons(hapd->iface);
|
||||
}
|
||||
|
||||
if (hostapd_get_aid(hapd, sta) < 0) {
|
||||
resp = WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA;
|
||||
wpa_printf(MSG_ERROR, " no room for more AIDs");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_IEEE80211N
|
||||
if ((sta->flags & WLAN_STA_HT) && sta->ht_capabilities) {
|
||||
u16 ht_capab = le_to_host16(
|
||||
|
@ -1088,12 +1094,6 @@ static void handle_assoc(struct hostapd_data *hapd,
|
|||
ieee802_11_set_beacons(hapd->iface);
|
||||
#endif /* CONFIG_IEEE80211N */
|
||||
|
||||
if (hostapd_get_aid(hapd, sta) < 0) {
|
||||
resp = WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA;
|
||||
wpa_printf(MSG_ERROR, " no room for more AIDs");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
|
||||
HOSTAPD_LEVEL_DEBUG,
|
||||
"association OK (aid %d)", sta->aid);
|
||||
|
|
Loading…
Reference in a new issue