diff --git a/tests/hwsim/hostapd.vlan b/tests/hwsim/hostapd.vlan new file mode 100644 index 000000000..b0e905bf5 --- /dev/null +++ b/tests/hwsim/hostapd.vlan @@ -0,0 +1,2 @@ +1 hwsimvlan1 +* testvlan# diff --git a/tests/hwsim/test_ap_vlan.py b/tests/hwsim/test_ap_vlan.py index 9b2550bfe..08534a1b7 100644 --- a/tests/hwsim/test_ap_vlan.py +++ b/tests/hwsim/test_ap_vlan.py @@ -28,6 +28,21 @@ def test_ap_vlan_open(dev, apdev): hwsim_utils.test_connectivity(dev[1].ifname, "brvlan2") hwsim_utils.test_connectivity(dev[2].ifname, apdev[0]['ifname']) +def test_ap_vlan_file_open(dev, apdev): + """AP VLAN with open network and vlan_file mapping""" + params = { "ssid": "test-vlan-open", + "dynamic_vlan": "1", + "vlan_file": "hostapd.vlan", + "accept_mac_file": "hostapd.accept" } + hostapd.add_ap(apdev[0]['ifname'], params) + + dev[0].connect("test-vlan-open", key_mgmt="NONE", scan_freq="2412") + dev[1].connect("test-vlan-open", key_mgmt="NONE", scan_freq="2412") + dev[2].connect("test-vlan-open", key_mgmt="NONE", scan_freq="2412") + hwsim_utils.test_connectivity(dev[0].ifname, "brvlan1") + hwsim_utils.test_connectivity(dev[1].ifname, "brvlan2") + hwsim_utils.test_connectivity(dev[2].ifname, apdev[0]['ifname']) + def test_ap_vlan_wpa2(dev, apdev): """AP VLAN with WPA2-PSK""" params = hostapd.wpa2_params(ssid="test-vlan",