From ce4e80ad0f88b016be472968247d743da0610ca9 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 29 Oct 2017 17:19:07 +0200 Subject: [PATCH] tests: WNM Sleep Mode - RSN with PMF and GTK/IGTK workaround Signed-off-by: Jouni Malinen --- tests/hwsim/test_wnm.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/tests/hwsim/test_wnm.py b/tests/hwsim/test_wnm.py index 150fb482f..31f5c59de 100644 --- a/tests/hwsim/test_wnm.py +++ b/tests/hwsim/test_wnm.py @@ -280,6 +280,30 @@ def test_wnm_sleep_mode_rsn_pmf(dev, apdev): raise Exception("No connection event received from hostapd") check_wnm_sleep_mode_enter_exit(hapd, dev[0]) +def test_wnm_sleep_mode_rsn_pmf_key_workaround(dev, apdev): + """WNM Sleep Mode - RSN with PMF and GTK/IGTK workaround""" + params = hostapd.wpa2_params("test-wnm-rsn", "12345678") + params["wpa_key_mgmt"] = "WPA-PSK-SHA256" + params["ieee80211w"] = "2" + params["time_advertisement"] = "2" + params["time_zone"] = "EST5" + params["wnm_sleep_mode"] = "1" + params["wnm_sleep_mode_no_keys"] = "1" + params["bss_transition"] = "1" + hapd = hostapd.add_ap(apdev[0], params) + + Wlantest.setup(hapd) + wt = Wlantest() + wt.flush() + wt.add_passphrase("12345678") + + dev[0].connect("test-wnm-rsn", psk="12345678", ieee80211w="2", + key_mgmt="WPA-PSK-SHA256", proto="WPA2", scan_freq="2412") + ev = hapd.wait_event([ "AP-STA-CONNECTED" ], timeout=5) + if ev is None: + raise Exception("No connection event received from hostapd") + check_wnm_sleep_mode_enter_exit(hapd, dev[0]) + def test_wnm_sleep_mode_proto(dev, apdev): """WNM Sleep Mode - protocol testing""" params = { "ssid": "test-wnm", "wnm_sleep_mode": "1" }