From 63dc0f9c4d89253987a9676f3b10d8ec44139357 Mon Sep 17 00:00:00 2001 From: Hu Wang Date: Wed, 25 Oct 2017 19:51:09 +0800 Subject: [PATCH] hostapd: Disassoc STA without WPA/RSN IE if AP proto is WPA/RSN 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 --- src/ap/drv_callbacks.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c index eabea8306..33f11aeda 100644 --- a/src/ap/drv_callbacks.c +++ b/src/ap/drv_callbacks.c @@ -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 &&