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

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