tests: WNM Disassociation Imminent failure cases
Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
5cf0930f9c
commit
dc15e92b46
1 changed files with 24 additions and 0 deletions
|
@ -62,6 +62,17 @@ def test_wnm_disassoc_imminent(dev, apdev):
|
||||||
if ev is None:
|
if ev is None:
|
||||||
raise Exception("Timeout while waiting for re-connection scan")
|
raise Exception("Timeout while waiting for re-connection scan")
|
||||||
|
|
||||||
|
def test_wnm_disassoc_imminent_fail(dev, apdev):
|
||||||
|
"""WNM Disassociation Imminent failure"""
|
||||||
|
params = { "ssid": "test-wnm", "bss_transition": "1" }
|
||||||
|
hapd = hostapd.add_ap(apdev[0], params)
|
||||||
|
|
||||||
|
dev[0].connect("test-wnm", key_mgmt="NONE", scan_freq="2412")
|
||||||
|
addr = dev[0].own_addr()
|
||||||
|
with fail_test(hapd, 1, "wnm_send_disassoc_imminent"):
|
||||||
|
if "FAIL" not in hapd.request("DISASSOC_IMMINENT " + addr + " 10"):
|
||||||
|
raise Exception("DISASSOC_IMMINENT succeeded during failure testing")
|
||||||
|
|
||||||
@remote_compatible
|
@remote_compatible
|
||||||
def test_wnm_ess_disassoc_imminent(dev, apdev):
|
def test_wnm_ess_disassoc_imminent(dev, apdev):
|
||||||
"""WNM ESS Disassociation Imminent"""
|
"""WNM ESS Disassociation Imminent"""
|
||||||
|
@ -84,6 +95,19 @@ def test_wnm_ess_disassoc_imminent(dev, apdev):
|
||||||
if ev is None:
|
if ev is None:
|
||||||
raise Exception("Timeout while waiting for re-connection scan")
|
raise Exception("Timeout while waiting for re-connection scan")
|
||||||
|
|
||||||
|
def test_wnm_ess_disassoc_imminent_fail(dev, apdev):
|
||||||
|
"""WNM ESS Disassociation Imminent failure"""
|
||||||
|
params = { "ssid": "test-wnm", "bss_transition": "1" }
|
||||||
|
hapd = hostapd.add_ap(apdev[0], params)
|
||||||
|
|
||||||
|
dev[0].connect("test-wnm", key_mgmt="NONE", scan_freq="2412")
|
||||||
|
addr = dev[0].own_addr()
|
||||||
|
if "FAIL" not in hapd.request("ESS_DISASSOC " + addr + " 10 http://" + 256*'a'):
|
||||||
|
raise Exception("Invalid ESS_DISASSOC URL accepted")
|
||||||
|
with fail_test(hapd, 1, "wnm_send_ess_disassoc_imminent"):
|
||||||
|
if "FAIL" not in hapd.request("ESS_DISASSOC " + addr + " 10 http://example.com/session-info"):
|
||||||
|
raise Exception("ESS_DISASSOC succeeded during failure testing")
|
||||||
|
|
||||||
def test_wnm_ess_disassoc_imminent_reject(dev, apdev):
|
def test_wnm_ess_disassoc_imminent_reject(dev, apdev):
|
||||||
"""WNM ESS Disassociation Imminent getting rejected"""
|
"""WNM ESS Disassociation Imminent getting rejected"""
|
||||||
params = { "ssid": "test-wnm",
|
params = { "ssid": "test-wnm",
|
||||||
|
|
Loading…
Reference in a new issue