Parcourir la source

tests: hostapd adding vendor elements to Beacon/Probe Response frames

This verifies that the configuration parameter vendor_elements works
correctly.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen il y a 11 ans
Parent
commit
52ec1aebe5
1 fichiers modifiés avec 13 ajouts et 0 suppressions
  1. 13 0
      tests/hwsim/test_ap_params.py

+ 13 - 0
tests/hwsim/test_ap_params.py

@@ -40,3 +40,16 @@ def test_ap_fragmentation_wpa2(dev, apdev):
     hostapd.add_ap(apdev[0]['ifname'], params)
     dev[0].connect(ssid, psk=passphrase, scan_freq="2412")
     hwsim_utils.test_connectivity(dev[0].ifname, apdev[0]['ifname'])
+
+def test_ap_vendor_elements(dev, apdev):
+    """WPA2-PSK AP with vendor elements added"""
+    bssid = apdev[0]['bssid']
+    ssid = "test-wpa2-psk"
+    passphrase = 'qwertyuiop'
+    params = hostapd.wpa2_params(ssid=ssid, passphrase=passphrase)
+    params['vendor_elements'] = "dd0411223301"
+    hostapd.add_ap(apdev[0]['ifname'], params)
+    dev[0].connect(ssid, psk=passphrase, scan_freq="2412")
+    bss = dev[0].get_bss(bssid)
+    if "dd0411223301" not in bss['ie']:
+        raise Exception("Vendor element not shown in scan results")