Blame SOURCES/rh1495527-0007-WNM-Ignore-WNM-Sleep-Mode-Response-without-pending-r.patch

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