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

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