From 52ec1aebe5ca0d5301e6b7ae9a980877a1631ac1 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Mon, 10 Mar 2014 10:42:41 +0200 Subject: [PATCH] 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 --- tests/hwsim/test_ap_params.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/hwsim/test_ap_params.py b/tests/hwsim/test_ap_params.py index a764d9877..692786092 100644 --- a/tests/hwsim/test_ap_params.py +++ b/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")