aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni@codeaurora.org>2019-02-11 15:37:08 (GMT)
committerJouni Malinen <j@w1.fi>2019-02-11 15:42:53 (GMT)
commitf3a841bbff689cf4e89831afe3192ff4d955c504 (patch)
tree06f88f3eeebd0e35a5cb0f49361f2b80fc4a2439
parent91205c8eb4e63ccc712edb8024f53fee15acb58e (diff)
downloadhostap-f3a841bbff689cf4e89831afe3192ff4d955c504.zip
hostap-f3a841bbff689cf4e89831afe3192ff4d955c504.tar.gz
hostap-f3a841bbff689cf4e89831afe3192ff4d955c504.tar.bz2
Do not disassociate not-associated STA on timeout
If the ap_handle_timer() timeout is reached for a not-associated STA, do not default to disassociating that STA first since Disassociation frame is not really appropriate to send to a STA that is not in associated state. Instead, skip directly to deauthentication and STA entry removal. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
-rw-r--r--src/ap/sta_info.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ap/sta_info.c b/src/ap/sta_info.c
index 8858a34..4a7722c 100644
--- a/src/ap/sta_info.c
+++ b/src/ap/sta_info.c
@@ -501,6 +501,13 @@ skip_poll:
} else if (sta->timeout_next != STA_REMOVE) {
int deauth = sta->timeout_next == STA_DEAUTH;
+ if (!deauth && !(sta->flags & WLAN_STA_ASSOC)) {
+ /* Cannot disassociate not-associated STA, so move
+ * directly to deauthentication. */
+ sta->timeout_next = STA_DEAUTH;
+ deauth = 1;
+ }
+
wpa_dbg(hapd->msg_ctx, MSG_DEBUG,
"Timeout, sending %s info to STA " MACSTR,
deauth ? "deauthentication" : "disassociation",