1 From 114f2830d2c2aee6db23d48240e93415a256a37c Mon Sep 17 00:00:00 2001
2 From: Jouni Malinen <jouni@qca.qualcomm.com>
3 Date: Fri, 20 Oct 2017 17:39:42 +0300
4 Subject: [PATCH] WNM: Ignore WNM-Sleep Mode Request in wnm_sleep_mode=0 case
6 The hostapd wnm_sleep_mode parameter was previously used to control
7 advertisement of WNM-Sleep Mode support, but it was not used when
8 processing a request to use WNM-Sleep Mode. Add an explicit check during
9 request processing as well so that any misbehaving station is ignored.
11 Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
13 src/ap/wnm_ap.c | 7 +++++++
14 1 file changed, 7 insertions(+)
16 diff --git a/src/ap/wnm_ap.c b/src/ap/wnm_ap.c
17 index 7c4fde0..973e4d3 100644
20 @@ -200,6 +200,13 @@ static void ieee802_11_rx_wnmsleep_req(struct hostapd_data *hapd,
21 u8 *tfsreq_ie_end = NULL;
22 u16 tfsreq_ie_len = 0;
24 + if (!hapd->conf->wnm_sleep_mode) {
25 + wpa_printf(MSG_DEBUG, "Ignore WNM-Sleep Mode Request from "
26 + MACSTR " since WNM-Sleep Mode is disabled",
31 dialog_token = *pos++;
32 while (pos + 1 < frm + len) {