tests: wpa_supplicant AP mode - unexpected P2P IE in Association Request
This verifies that there is no NULL pointer dereference when the AP code processes Probe Request and (Re)Association Request frames with a P2P IE in case P2P support is explicitly disabled on the AP mode interface. This is a regression test case for the fixes in the previous commit. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
4f6cd3f426
commit
656f11c732
1 changed files with 27 additions and 0 deletions
|
@ -357,3 +357,30 @@ def test_wpas_ap_acs(dev):
|
|||
raise Exception("Unexpected operating channel selected")
|
||||
|
||||
dev[1].connect("wpas-ap-open", key_mgmt="NONE", scan_freq=freq)
|
||||
|
||||
def test_wpas_ap_and_assoc_req_p2p_ie(dev):
|
||||
"""wpa_supplicant AP mode - unexpected P2P IE in Association Request"""
|
||||
try:
|
||||
_test_wpas_ap_and_assoc_req_p2p_ie(dev)
|
||||
finally:
|
||||
dev[1].request("VENDOR_ELEM_REMOVE 13 *")
|
||||
dev[0].request("P2P_SET disabled 0")
|
||||
|
||||
def _test_wpas_ap_and_assoc_req_p2p_ie(dev):
|
||||
dev[0].request("P2P_SET disabled 1")
|
||||
id = dev[0].add_network()
|
||||
dev[0].set_network(id, "mode", "2")
|
||||
dev[0].set_network_quoted(id, "ssid", "wpas-ap-open")
|
||||
dev[0].set_network(id, "key_mgmt", "NONE")
|
||||
dev[0].set_network(id, "frequency", "2412")
|
||||
dev[0].set_network(id, "scan_freq", "2412")
|
||||
dev[0].select_network(id)
|
||||
wait_ap_ready(dev[0])
|
||||
|
||||
dev[1].request("VENDOR_ELEM_ADD 13 dd04506f9a09")
|
||||
dev[1].connect("wpas-ap-open", key_mgmt="NONE", scan_freq="2412")
|
||||
dev[1].request("DISCONNECT")
|
||||
dev[1].wait_disconnected()
|
||||
|
||||
dev[0].request("DISCONNECT")
|
||||
dev[0].wait_disconnected()
|
||||
|
|
Loading…
Reference in a new issue