1
0

011-WNM-Ignore-WNM-Sleep-Mode-Response-without-pending-r.patch 1.3 KB

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