diff --git a/tests/hwsim/hostapd.accept2 b/tests/hwsim/hostapd.accept2 new file mode 100644 index 000000000..3d41e348a --- /dev/null +++ b/tests/hwsim/hostapd.accept2 @@ -0,0 +1,3 @@ +02:00:00:00:00:00 1 +02:00:00:00:01:00 2 +02:00:00:00:02:00 3 diff --git a/tests/hwsim/hostapd.vlan2 b/tests/hwsim/hostapd.vlan2 new file mode 100644 index 000000000..46bf6281d --- /dev/null +++ b/tests/hwsim/hostapd.vlan2 @@ -0,0 +1,3 @@ +1 hwsimvlan1 +3 hwsimvlan3 hwsimbr3 +* testvlan# diff --git a/tests/hwsim/test_ap_vlan.py b/tests/hwsim/test_ap_vlan.py index e3b8eb6c9..76a53d8d1 100644 --- a/tests/hwsim/test_ap_vlan.py +++ b/tests/hwsim/test_ap_vlan.py @@ -53,6 +53,21 @@ def test_ap_vlan_file_open(dev, apdev): hwsim_utils.test_connectivity_iface(dev[1], hapd, "brvlan2") hwsim_utils.test_connectivity(dev[2], hapd) +def test_ap_vlan_file_open2(dev, apdev): + """AP VLAN with open network and vlan_file mapping (2)""" + params = { "ssid": "test-vlan-open", + "dynamic_vlan": "1", + "vlan_file": "hostapd.vlan2", + "accept_mac_file": "hostapd.accept2" } + hapd = hostapd.add_ap(apdev[0], 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_iface(dev[0], hapd, "brvlan1") + hwsim_utils.test_connectivity_iface(dev[1], hapd, "brvlan2") + hwsim_utils.test_connectivity_iface(dev[2], hapd, "hwsimbr3") + def test_ap_vlan_file_parsing(dev, apdev, params): """hostapd vlan_file/mac_file parsing""" tmp = os.path.join(params['logdir'], 'ap_vlan_file_parsing.tmp')