]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/wpa_supplicant/0007-WNM-Ignore-WNM-Sleep-Mode-Response-without-pending-r.patch
netsnmp: Fix rootfile to build on other architectures
[people/pmueller/ipfire-2.x.git] / src / patches / wpa_supplicant / 0007-WNM-Ignore-WNM-Sleep-Mode-Response-without-pending-r.patch
CommitLineData
d7d57745
MT
1From b839814391abb4f95486ef2e24eb5498267eccf5 Mon Sep 17 00:00:00 2001
2From: Jouni Malinen <j@w1.fi>
3Date: Fri, 22 Sep 2017 11:25:02 +0300
4Subject: [PATCH 7/8] WNM: Ignore WNM-Sleep Mode Response without pending
5 request
6
7Commit 03ed0a52393710be6bdae657d1b36efa146520e5 ('WNM: Ignore WNM-Sleep
8Mode Response if WNM-Sleep Mode has not been used') started ignoring the
9response when no WNM-Sleep Mode Request had been used during the
10association. This can be made tighter by clearing the used flag when
11successfully processing a response. This adds an additional layer of
12protection against unexpected retransmissions of the response frame.
13
14Signed-off-by: Jouni Malinen <j@w1.fi>
15---
16 wpa_supplicant/wnm_sta.c | 4 +++-
17 1 file changed, 3 insertions(+), 1 deletion(-)
18
19diff --git a/wpa_supplicant/wnm_sta.c b/wpa_supplicant/wnm_sta.c
20index 7339ed2..28346ea 100644
21--- a/wpa_supplicant/wnm_sta.c
22+++ b/wpa_supplicant/wnm_sta.c
23@@ -260,7 +260,7 @@ static void ieee802_11_rx_wnmsleep_resp(struct wpa_supplicant *wpa_s,
24
25 if (!wpa_s->wnmsleep_used) {
26 wpa_printf(MSG_DEBUG,
27- "WNM: Ignore WNM-Sleep Mode Response frame since WNM-Sleep Mode has not been used in this association");
28+ "WNM: Ignore WNM-Sleep Mode Response frame since WNM-Sleep Mode operation has not been requested");
29 return;
30 }
31
32@@ -299,6 +299,8 @@ static void ieee802_11_rx_wnmsleep_resp(struct wpa_supplicant *wpa_s,
33 return;
34 }
35
36+ wpa_s->wnmsleep_used = 0;
37+
38 if (wnmsleep_ie->status == WNM_STATUS_SLEEP_ACCEPT ||
39 wnmsleep_ie->status == WNM_STATUS_SLEEP_EXIT_ACCEPT_GTK_UPDATE) {
40 wpa_printf(MSG_DEBUG, "Successfully recv WNM-Sleep Response "
41--
422.7.4
43