aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2016-08-18 07:42:56 (GMT)
committerJouni Malinen <j@w1.fi>2016-08-18 07:42:56 (GMT)
commit6b6286eb78076e098e855c608fcb1a7b27518e79 (patch)
tree300303be12e2e0984ceb98f9517b61a91f68bd20 /tests
parent81372e347a83661c62c0e762c4edb51e2acc43d7 (diff)
downloadhostap-6b6286eb78076e098e855c608fcb1a7b27518e79.zip
hostap-6b6286eb78076e098e855c608fcb1a7b27518e79.tar.gz
hostap-6b6286eb78076e098e855c608fcb1a7b27518e79.tar.bz2
tests: hostapd and MIB ctrl_iface command with open network
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/hwsim/test_hapd_ctrl.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/hwsim/test_hapd_ctrl.py b/tests/hwsim/test_hapd_ctrl.py
index 8d51060..597f2bf 100644
--- a/tests/hwsim/test_hapd_ctrl.py
+++ b/tests/hwsim/test_hapd_ctrl.py
@@ -614,3 +614,33 @@ def test_hapd_ctrl_disconnect_no_tx(dev, apdev):
raise Exception("Disconnection event not seen after TX attempt")
if "reason=7" not in ev:
raise Exception("Unexpected disconnection reason: " + ev)
+
+def test_hapd_ctrl_mib(dev, apdev):
+ """hostapd and MIB ctrl_iface command with open network"""
+ ssid = "hapd-ctrl"
+ params = { "ssid": ssid }
+ hapd = hostapd.add_ap(apdev[0], params)
+
+ mib = hapd.request("MIB")
+ if len(mib) != 0:
+ raise Exception("Unexpected MIB response: " + mib)
+
+ mib = hapd.request("MIB radius_server")
+ if len(mib) != 0:
+ raise Exception("Unexpected 'MIB radius_server' response: " + mib)
+
+ if "FAIL" not in hapd.request("MIB foo"):
+ raise Exception("'MIB foo' succeeded")
+
+ dev[0].connect(ssid, key_mgmt="NONE", scan_freq="2412")
+
+ mib = hapd.request("MIB")
+ if "FAIL" in mib:
+ raise Exception("Unexpected MIB response: " + mib)
+
+ mib = hapd.request("MIB radius_server")
+ if len(mib) != 0:
+ raise Exception("Unexpected 'MIB radius_server' response: " + mib)
+
+ if "FAIL" not in hapd.request("MIB foo"):
+ raise Exception("'MIB foo' succeeded")