From: Jouni Malinen Date: Sun, 25 May 2014 15:43:17 +0000 (+0300) Subject: tests: Limit on number of GAS pending dialog contexts X-Git-Tag: hostap_2_2~77 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d1de2306d5be6c1c6199070e092e380f151000e;p=thirdparty%2Fhostap.git tests: Limit on number of GAS pending dialog contexts Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_gas.py b/tests/hwsim/test_gas.py index ac0abae79..8ad07b28c 100644 --- a/tests/hwsim/test_gas.py +++ b/tests/hwsim/test_gas.py @@ -13,6 +13,7 @@ import re import struct import hostapd +from wpasupplicant import WpaSupplicant def hs20_ap_params(): params = hostapd.wpa2_params(ssid="test-gas") @@ -357,6 +358,13 @@ def parse_gas(payload): return None gas['dialog_token'] = dialog_token + + if action == GAS_INITIAL_RESPONSE: + if len(pos) < 4: + return None + (status_code, comeback_delay) = struct.unpack(' 8 and status_code == 0: + raise Exception("Unexpected success status code {} for dialog token {}".format(status_code, dialog_token))