1 From: Jouni Malinen <j@w1.fi>
2 Date: Fri, 22 Sep 2017 11:25:02 +0300
3 Subject: [PATCH] WNM: Ignore WNM-Sleep Mode Response without pending
6 Commit 03ed0a52393710be6bdae657d1b36efa146520e5 ('WNM: Ignore WNM-Sleep
7 Mode Response if WNM-Sleep Mode has not been used') started ignoring the
8 response when no WNM-Sleep Mode Request had been used during the
9 association. This can be made tighter by clearing the used flag when
10 successfully processing a response. This adds an additional layer of
11 protection against unexpected retransmissions of the response frame.
13 Signed-off-by: Jouni Malinen <j@w1.fi>
16 --- a/wpa_supplicant/wnm_sta.c
17 +++ b/wpa_supplicant/wnm_sta.c
18 @@ -260,7 +260,7 @@ static void ieee802_11_rx_wnmsleep_resp(
20 if (!wpa_s->wnmsleep_used) {
22 - "WNM: Ignore WNM-Sleep Mode Response frame since WNM-Sleep Mode has not been used in this association");
23 + "WNM: Ignore WNM-Sleep Mode Response frame since WNM-Sleep Mode operation has not been requested");
27 @@ -299,6 +299,8 @@ static void ieee802_11_rx_wnmsleep_resp(
31 + wpa_s->wnmsleep_used = 0;
33 if (wnmsleep_ie->status == WNM_STATUS_SLEEP_ACCEPT ||
34 wnmsleep_ie->status == WNM_STATUS_SLEEP_EXIT_ACCEPT_GTK_UPDATE) {
35 wpa_printf(MSG_DEBUG, "Successfully recv WNM-Sleep Response "