From 63a19e56b0d1db7423bb4fea2ec791f29ee863bc Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 25 Oct 2015 15:47:31 +0200 Subject: [PATCH] tests: WNM Action protocol testing (PMF disabled) Signed-off-by: Jouni Malinen --- tests/hwsim/test_wnm.py | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/tests/hwsim/test_wnm.py b/tests/hwsim/test_wnm.py index 9987d60ce..824ae6011 100644 --- a/tests/hwsim/test_wnm.py +++ b/tests/hwsim/test_wnm.py @@ -968,3 +968,41 @@ def test_wnm_action_proto_pmf(dev, apdev): WLAN_EID_TFS_RESP, 0) hapd.mgmt_tx(msg) expect_ack(hapd) + +def test_wnm_action_proto_no_pmf(dev, apdev): + """WNM Action protocol testing (PMF disabled)""" + ssid = "test-wnm-no-pmf" + params = hostapd.wpa2_params(ssid=ssid, passphrase="12345678") + hapd = hostapd.add_ap(apdev[0]['ifname'], params) + bssid = apdev[0]['bssid'] + dev[0].connect(ssid, psk="12345678", key_mgmt="WPA-PSK", + proto="WPA2", ieee80211w="0", scan_freq="2412") + hapd.set("ext_mgmt_frame_handling", "1") + + msg = {} + msg['fc'] = MGMT_SUBTYPE_ACTION << 4 + msg['da'] = dev[0].own_addr() + msg['sa'] = bssid + msg['bssid'] = bssid + + logger.debug("WNM Sleep Mode Response - GTK subelem and IGTK subelem") + keydata = struct.pack("2L4L", 0x01020304, 0x05060708, + 0x11223344, 0x55667788, 0x9900aabb, 0xccddeeff) + keydata += struct.pack("