From: Jouni Malinen Date: Sun, 29 Nov 2009 19:11:10 +0000 (+0200) Subject: Check AID availability before handling HT state updates on association X-Git-Tag: hostap_0_7_1~439 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a3c6f5077fa76148e850f5ba72df71329869c64;p=thirdparty%2Fhostap.git Check AID availability before handling HT state updates on association --- diff --git a/hostapd/ieee802_11.c b/hostapd/ieee802_11.c index 0522b88fb..ed0bdd390 100644 --- a/hostapd/ieee802_11.c +++ b/hostapd/ieee802_11.c @@ -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);