From: Hu Wang Date: Wed, 25 Oct 2017 11:51:09 +0000 (+0800) Subject: hostapd: Disassoc STA without WPA/RSN IE if AP proto is WPA/RSN X-Git-Tag: hostap_2_7~791 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=63dc0f9c4d89253987a9676f3b10d8ec44139357;p=thirdparty%2Fhostap.git 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 --- 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 &&