]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: ANQP protection indication
authorJouni Malinen <jouni@codeaurora.org>
Mon, 23 Nov 2020 18:35:00 +0000 (20:35 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 23 Nov 2020 18:35:00 +0000 (20:35 +0200)
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
tests/hwsim/test_gas.py

index 5d60779e95317598aa6fe3b554033c67f8e96b90..cb4a1a8d6656fc1ff271d4feb84ea57e7656ed65 100644 (file)
@@ -1670,6 +1670,11 @@ def test_gas_anqp_venue_url(dev, apdev):
     if not bss['anqp_capability_list'].startswith(binascii.hexlify(ids).decode()):
         raise Exception("Unexpected Capability List ANQP-element value: " + bss['anqp_capability_list'])
 
+    if "anqp[277]" not in bss:
+        raise Exception("Venue-URL ANQP info not available")
+    if "protected-anqp-info[277]" in bss:
+        raise Exception("Unexpected Venue-URL protection info")
+
 def test_gas_anqp_venue_url2(dev, apdev):
     """GAS/ANQP and Venue URL (hostapd venue_url)"""
     venue_group = 1
@@ -1775,6 +1780,14 @@ def test_gas_anqp_venue_url_pmf(dev, apdev):
     if "2 " + url2 not in ev:
         raise Exception("Unexpected Venue URL information (2): " + ev)
 
+    bss = dev[0].get_bss(bssid)
+    if "anqp[277]" not in bss:
+        raise Exception("Venue-URL ANQP info not available")
+    if "protected-anqp-info[277]" not in bss:
+        raise Exception("Venue-URL protection info not available")
+    if bss["protected-anqp-info[277]"] != "1":
+        raise Exception("Venue-URL was not indicated to be protected")
+
 def test_gas_anqp_capab_list(dev, apdev):
     """GAS/ANQP and Capability List ANQP-element"""
     params = {"ssid": "gas/anqp",