mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 00:38:24 -05:00
tests: Start WNM-Sleep Mode in wnm_action_proto*
This is needed to avoid test case failures with additional state validation in wpa_supplicant. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
63a19e56b0
commit
8823178c96
@ -675,9 +675,12 @@ def test_wnm_bss_tm_global(dev, apdev):
|
||||
def test_wnm_action_proto(dev, apdev):
|
||||
"""WNM Action protocol testing"""
|
||||
params = { "ssid": "test-wnm" }
|
||||
params['wnm_sleep_mode'] = '1'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
dev[0].connect("test-wnm", key_mgmt="NONE", scan_freq="2412")
|
||||
dev[0].request("WNM_SLEEP enter")
|
||||
time.sleep(0.1)
|
||||
hapd.set("ext_mgmt_frame_handling", "1")
|
||||
|
||||
msg = {}
|
||||
@ -874,10 +877,13 @@ def test_wnm_action_proto_pmf(dev, apdev):
|
||||
params = hostapd.wpa2_params(ssid=ssid, passphrase="12345678")
|
||||
params["wpa_key_mgmt"] = "WPA-PSK-SHA256"
|
||||
params["ieee80211w"] = "2"
|
||||
params['wnm_sleep_mode'] = '1'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
dev[0].connect(ssid, psk="12345678", key_mgmt="WPA-PSK-SHA256",
|
||||
proto="WPA2", ieee80211w="2", scan_freq="2412")
|
||||
dev[0].request("WNM_SLEEP enter")
|
||||
time.sleep(0.1)
|
||||
hapd.set("ext_mgmt_frame_handling", "1")
|
||||
|
||||
msg = {}
|
||||
@ -973,10 +979,13 @@ 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")
|
||||
params['wnm_sleep_mode'] = '1'
|
||||
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")
|
||||
dev[0].request("WNM_SLEEP enter")
|
||||
time.sleep(0.1)
|
||||
hapd.set("ext_mgmt_frame_handling", "1")
|
||||
|
||||
msg = {}
|
||||
|
Loading…
Reference in New Issue
Block a user