mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 00:38:24 -05:00
tests: Verify double DISABLE on hostapd with multi-BSS configuration
This used to result in a segmentation fault due to use of freed memory (mismatch in pointer lifetime between hostapd.c and driver_nl80211.c). Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
d92bdf9602
commit
de93da914f
@ -314,3 +314,16 @@ def test_ap_enable_disable_reenable(dev, apdev):
|
||||
ev = dev[0].wait_event(["CTRL-EVENT-CONNECTED"])
|
||||
if ev is None:
|
||||
raise Exception("STA connect event timed out")
|
||||
|
||||
def test_ap_double_disable(dev, apdev):
|
||||
"""Double DISABLE regression test"""
|
||||
hostapd.add_bss('phy3', apdev[0]['ifname'], 'bss-1.conf')
|
||||
hostapd.add_bss('phy3', apdev[0]['ifname'] + '-2', 'bss-2.conf')
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
hapd.disable()
|
||||
if "FAIL" not in hapd.request("DISABLE"):
|
||||
raise Exception("Second DISABLE accepted unexpectedly")
|
||||
hapd.enable()
|
||||
hapd.disable()
|
||||
if "FAIL" not in hapd.request("DISABLE"):
|
||||
raise Exception("Second DISABLE accepted unexpectedly")
|
||||
|
Loading…
Reference in New Issue
Block a user