]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
hostapd: Disassoc STA without WPA/RSN IE if AP proto is WPA/RSN
authorHu Wang <huw@codeaurora.org>
Wed, 25 Oct 2017 11:51:09 +0000 (19:51 +0800)
committerJouni Malinen <j@w1.fi>
Thu, 23 Nov 2017 18:12:34 +0000 (20:12 +0200)
With the AP proto configured being WPA/RSN and SME in the
driver, the previous implementation in hostapd is to not
process hostapd_notif_assoc() due to "No WPA/RSN IE from STA",
if the (Re)Association Request frame is without the WPA/RSN IEs.

Enhance that to disassociate such station provided the AP is not using
WPS.

Signed-off-by: Hu Wang <huw@codeaurora.org>
src/ap/drv_callbacks.c

index eabea830603c9bb336bd24ffd9b35d01fc0c24ce..33f11aeda455d20a99c55238def938babd98636a 100644 (file)
@@ -262,7 +262,9 @@ int hostapd_notif_assoc(struct hostapd_data *hapd, const u8 *addr,
 #endif /* CONFIG_WPS */
 
                        wpa_printf(MSG_DEBUG, "No WPA/RSN IE from STA");
-                       return -1;
+                       reason = WLAN_REASON_INVALID_IE;
+                       status = WLAN_STATUS_INVALID_IE;
+                       goto fail;
                }
 #ifdef CONFIG_WPS
                if (hapd->conf->wps_state && ie[0] == 0xdd && ie[1] >= 4 &&