]> git.ipfire.org Git - ipfire-2.x.git/blob - src/patches/wpa_supplicant/0007-WNM-Ignore-WNM-Sleep-Mode-Response-without-pending-r.patch
netsnmp: Fix rootfile to build on other architectures
[ipfire-2.x.git] / src / patches / wpa_supplicant / 0007-WNM-Ignore-WNM-Sleep-Mode-Response-without-pending-r.patch
1 From b839814391abb4f95486ef2e24eb5498267eccf5 Mon Sep 17 00:00:00 2001
2 From: Jouni Malinen <j@w1.fi>
3 Date: Fri, 22 Sep 2017 11:25:02 +0300
4 Subject: [PATCH 7/8] WNM: Ignore WNM-Sleep Mode Response without pending
5 request
6
7 Commit 03ed0a52393710be6bdae657d1b36efa146520e5 ('WNM: Ignore WNM-Sleep
8 Mode Response if WNM-Sleep Mode has not been used') started ignoring the
9 response when no WNM-Sleep Mode Request had been used during the
10 association. This can be made tighter by clearing the used flag when
11 successfully processing a response. This adds an additional layer of
12 protection against unexpected retransmissions of the response frame.
13
14 Signed-off-by: Jouni Malinen <j@w1.fi>
15 ---
16 wpa_supplicant/wnm_sta.c | 4 +++-
17 1 file changed, 3 insertions(+), 1 deletion(-)
18
19 diff --git a/wpa_supplicant/wnm_sta.c b/wpa_supplicant/wnm_sta.c
20 index 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 --
42 2.7.4
43