mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 00:38:24 -05:00
tests: hostapd and MIB ctrl_iface command with open network
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
81372e347a
commit
6b6286eb78
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user