907-v2.6-0007-WNM-Ignore-WNM-Sleep-Mode-Response-without-pending-r.patch 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. From 53c5eb58e95004f86e65ee9fbfccbc291b139057 Mon Sep 17 00:00:00 2001
  2. From: Jouni Malinen <j@w1.fi>
  3. Date: Fri, 22 Sep 2017 11:25:02 +0300
  4. Subject: [PATCH 7/8] WNM: Ignore WNM-Sleep Mode Response without pending
  5. request
  6. Commit 03ed0a52393710be6bdae657d1b36efa146520e5 ('WNM: Ignore WNM-Sleep
  7. Mode Response if WNM-Sleep Mode has not been used') started ignoring the
  8. response when no WNM-Sleep Mode Request had been used during the
  9. association. This can be made tighter by clearing the used flag when
  10. successfully processing a response. This adds an additional layer of
  11. protection against unexpected retransmissions of the response frame.
  12. Signed-off-by: Jouni Malinen <j@w1.fi>
  13. ---
  14. wpa_supplicant/wnm_sta.c | 4 +++-
  15. 1 file changed, 3 insertions(+), 1 deletion(-)
  16. diff --git a/wpa_supplicant/wnm_sta.c b/wpa_supplicant/wnm_sta.c
  17. index 1b3409c..67a07ff 100644
  18. --- a/wpa_supplicant/wnm_sta.c
  19. +++ b/wpa_supplicant/wnm_sta.c
  20. @@ -260,7 +260,7 @@ static void ieee802_11_rx_wnmsleep_resp(struct wpa_supplicant *wpa_s,
  21. if (!wpa_s->wnmsleep_used) {
  22. wpa_printf(MSG_DEBUG,
  23. - "WNM: Ignore WNM-Sleep Mode Response frame since WNM-Sleep Mode has not been used in this association");
  24. + "WNM: Ignore WNM-Sleep Mode Response frame since WNM-Sleep Mode operation has not been requested");
  25. return;
  26. }
  27. @@ -299,6 +299,8 @@ static void ieee802_11_rx_wnmsleep_resp(struct wpa_supplicant *wpa_s,
  28. return;
  29. }
  30. + wpa_s->wnmsleep_used = 0;
  31. +
  32. if (wnmsleep_ie->status == WNM_STATUS_SLEEP_ACCEPT ||
  33. wnmsleep_ie->status == WNM_STATUS_SLEEP_EXIT_ACCEPT_GTK_UPDATE) {
  34. wpa_printf(MSG_DEBUG, "Successfully recv WNM-Sleep Response "
  35. --
  36. 2.7.4