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

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