[PATCH] hostapd: Disassoc STA without WPA/RSN IE if AP proto is WPA/RSN

huw at codeaurora.org huw at codeaurora.org
Wed Oct 25 04:51:09 PDT 2017


Author: Hu Wang <huw at codeaurora.org>
Date:   Wed Oct 25 19:41:00 2017 +0800

     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 current 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 IE's.

     Enhance the current implementation to disassoc such station,
     provided the AP is not in WPS.

     Signed-off-by: Hu Wang <huw at codeaurora.org>

diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c
index ffa8bf1..944f155 100644
--- a/src/ap/drv_callbacks.c
+++ b/src/ap/drv_callbacks.c
@@ -262,7 +262,8 @@ 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;
+                       goto fail;
                 }
  #ifdef CONFIG_WPS
                 if (hapd->conf->wps_state && ie[0] == 0xdd && ie[1] >= 4 
&&



More information about the Hostap mailing list