From: Jouni Malinen Date: Sat, 29 Apr 2017 15:00:26 +0000 (+0300) Subject: tests: DISABLE_NETWORK during connection and blacklist behavior X-Git-Tag: hostap_2_7~1357 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6abde545558671d01c19ea41cdb4f7a82a0bc343;p=thirdparty%2Fhostap.git tests: DISABLE_NETWORK during connection and blacklist behavior Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_ap_open.py b/tests/hwsim/test_ap_open.py index d8f23d2b7..905acf93a 100644 --- a/tests/hwsim/test_ap_open.py +++ b/tests/hwsim/test_ap_open.py @@ -776,3 +776,17 @@ def run_ap_open_country(dev, apdev, country_code, country3): dev[0].connect("open", key_mgmt="NONE", scan_freq="2412") dev[0].request("DISCONNECT") dev[0].wait_disconnected() + +def test_ap_open_disable_select(dev, apdev): + """DISABLE_NETWORK for connected AP followed by SELECT_NETWORK""" + hapd1 = hostapd.add_ap(apdev[0], { "ssid": "open" }) + hapd2 = hostapd.add_ap(apdev[1], { "ssid": "open" }) + id = dev[0].connect("open", key_mgmt="NONE", scan_freq="2412") + + dev[0].request("DISABLE_NETWORK %d" % id) + dev[0].wait_disconnected() + res = dev[0].request("BLACKLIST") + if hapd1.own_addr() in res or hapd2.own_addr() in res: + raise Exception("Unexpected blacklist entry added") + dev[0].request("SELECT_NETWORK %d" % id) + dev[0].wait_connected()