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