1
0

019-WNM-Ignore-WNM-Sleep-Mode-Request-in-wnm_sleep_mode-.patch 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  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
  5. The hostapd wnm_sleep_mode parameter was previously used to control
  6. advertisement of WNM-Sleep Mode support, but it was not used when
  7. processing a request to use WNM-Sleep Mode. Add an explicit check during
  8. request processing as well so that any misbehaving station is ignored.
  9. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
  10. ---
  11. src/ap/wnm_ap.c | 7 +++++++
  12. 1 file changed, 7 insertions(+)
  13. diff --git a/src/ap/wnm_ap.c b/src/ap/wnm_ap.c
  14. index 7c4fde0..973e4d3 100644
  15. --- a/src/ap/wnm_ap.c
  16. +++ b/src/ap/wnm_ap.c
  17. @@ -200,6 +200,13 @@ static void ieee802_11_rx_wnmsleep_req(struct hostapd_data *hapd,
  18. u8 *tfsreq_ie_end = NULL;
  19. u16 tfsreq_ie_len = 0;
  20. + if (!hapd->conf->wnm_sleep_mode) {
  21. + wpa_printf(MSG_DEBUG, "Ignore WNM-Sleep Mode Request from "
  22. + MACSTR " since WNM-Sleep Mode is disabled",
  23. + MAC2STR(addr));
  24. + return;
  25. + }
  26. +
  27. dialog_token = *pos++;
  28. while (pos + 1 < frm + len) {
  29. u8 ie_len = pos[1];
  30. --
  31. 2.1.4