From: Jouni Malinen Date: Sun, 28 Jul 2019 20:51:39 +0000 (+0300) Subject: tests: Extend ap_pmf_inject_auth to cover injection of AssocReq X-Git-Tag: hostap_2_9~50 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=eb42db4a74cbd1d3c7cfef185a19b313caffc6bf;p=thirdparty%2Fhostap.git tests: Extend ap_pmf_inject_auth to cover injection of AssocReq Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_ap_pmf.py b/tests/hwsim/test_ap_pmf.py index 62f0947ff..a825330ab 100644 --- a/tests/hwsim/test_ap_pmf.py +++ b/tests/hwsim/test_ap_pmf.py @@ -562,6 +562,20 @@ def test_ap_pmf_inject_auth(dev, apdev): hapd.request("SET ext_mgmt_frame_handling 0") if "OK" not in res: raise Exception("MGMT_RX_PROCESS failed") + time.sleep(0.1) + + # Verify that original association is still functional. + hwsim_utils.test_connectivity(dev[0], hapd) + + # Inject an unprotected Association Request frame claiming to be from the + # associated STA. + auth = "00003a01" + bssid + addr + bssid + '2000' + '31040500' + '0008746573742d706d66' + '010802040b160c121824' + '301a0100000fac040100000fac040100000fac06c0000000000fac06' + hapd.request("SET ext_mgmt_frame_handling 1") + res = hapd.request("MGMT_RX_PROCESS freq=2412 datarate=0 ssi_signal=-30 frame=%s" % auth) + hapd.request("SET ext_mgmt_frame_handling 0") + if "OK" not in res: + raise Exception("MGMT_RX_PROCESS failed") + time.sleep(5) # Verify that original association is still functional. hwsim_utils.test_connectivity(dev[0], hapd)