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