From 6ac48fd9e8aa9feea3d6a8b7918e133030f17b9b Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Tue, 14 Apr 2020 13:50:53 +0300 Subject: [PATCH] tests: FT-SAE AP and unexpected RSNXE Used in ReassocReq Signed-off-by: Jouni Malinen --- tests/hwsim/test_ap_ft.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/hwsim/test_ap_ft.py b/tests/hwsim/test_ap_ft.py index abc9431e8..2b1d925e3 100644 --- a/tests/hwsim/test_ap_ft.py +++ b/tests/hwsim/test_ap_ft.py @@ -1213,6 +1213,25 @@ def test_ap_ft_sae_h2e_rsnxe_mismatch(dev, apdev): finally: dev[0].set("sae_pwe", "0") +def test_ap_ft_sae_rsnxe_used_mismatch(dev, apdev): + """FT-SAE AP and unexpected RSNXE Used in ReassocReq""" + try: + hapd0, hapd1 = start_ft_sae(dev[0], apdev, sae_pwe="2") + dev[0].set("sae_pwe", "0") + dev[0].set("ft_rsnxe_used", "1") + next = run_roams(dev[0], apdev, hapd0, hapd1, "test-ft", "12345678", + sae=True, return_after_initial=True) + if "OK" not in dev[0].request("ROAM " + next): + raise Exception("ROAM command failed") + # The target AP is expected to discard Reassociation Response frame due + # to RSNXE Used mismatch. This will result in roaming timeout and + # returning back to the old AP. + ev = dev[0].wait_event(["CTRL-EVENT-CONNECTED"], timeout=5) + if ev and next in ev: + raise Exception("Roaming succeeded unexpectedly") + finally: + dev[0].set("sae_pwe", "0") + def test_ap_ft_sae_pw_id(dev, apdev): """FT-SAE with Password Identifier""" if "SAE" not in dev[0].get_capability("auth_alg"):