diff --git a/tests/hwsim/test_gas.py b/tests/hwsim/test_gas.py index 3279582e7..e8eac9fe0 100644 --- a/tests/hwsim/test_gas.py +++ b/tests/hwsim/test_gas.py @@ -612,6 +612,13 @@ def init_gas(hapd, bssid, dev): raise Exception("Unexpected dialog token change") return query, dialog_token +def allow_gas_initial_req(hapd, dialog_token): + msg = hapd.mgmt_rx(timeout=1) + if msg is not None: + gas = parse_gas(msg['payload']) + if gas['action'] != GAS_INITIAL_REQUEST or dialog_token == gas['dialog_token']: + raise Exception("Unexpected management frame") + def test_gas_malformed_comeback_resp(dev, apdev): """GAS malformed comeback response frames""" hapd = start_ap(apdev[0]) @@ -671,9 +678,7 @@ def test_gas_malformed_comeback_resp(dev, apdev): resp = action_response(query) resp['payload'] = anqp_initial_resp(dialog_token, 0) + struct.pack('