blob: 63d1b8a3b8353387e2afea524d62b38386516611 [file] [log] [blame]
developer29c4d2d2022-12-26 19:41:22 +08001--- a/src/ap/ap_config.h
2+++ b/src/ap/ap_config.h
3@@ -121,6 +121,7 @@ struct hostapd_ssid {
4 #define DYNAMIC_VLAN_OPTIONAL 1
5 #define DYNAMIC_VLAN_REQUIRED 2
6 int dynamic_vlan;
7+ int vlan_no_bridge;
8 #define DYNAMIC_VLAN_NAMING_WITHOUT_DEVICE 0
9 #define DYNAMIC_VLAN_NAMING_WITH_DEVICE 1
10 #define DYNAMIC_VLAN_NAMING_END 2
11--- a/src/ap/vlan_full.c
12+++ b/src/ap/vlan_full.c
13@@ -475,6 +475,9 @@ void vlan_newlink(const char *ifname, st
14 if (!vlan)
15 return;
16
17+ if (hapd->conf->ssid.vlan_no_bridge)
18+ goto out;
19+
20 vlan->configured = 1;
21
22 notempty = vlan->vlan_desc.notempty;
23@@ -506,6 +509,7 @@ void vlan_newlink(const char *ifname, st
24 ifname, br_name, tagged[i], hapd);
25 }
26
27+out:
28 ifconfig_up(ifname);
29 }
30
31--- a/hostapd/config_file.c
32+++ b/hostapd/config_file.c
developerdfb50982023-09-11 13:34:36 +080033@@ -3351,6 +3351,8 @@ static int hostapd_config_fill(struct ho
developer29c4d2d2022-12-26 19:41:22 +080034 #ifndef CONFIG_NO_VLAN
35 } else if (os_strcmp(buf, "dynamic_vlan") == 0) {
36 bss->ssid.dynamic_vlan = atoi(pos);
37+ } else if (os_strcmp(buf, "vlan_no_bridge") == 0) {
38+ bss->ssid.vlan_no_bridge = atoi(pos);
39 } else if (os_strcmp(buf, "per_sta_vif") == 0) {
40 bss->ssid.per_sta_vif = atoi(pos);
41 } else if (os_strcmp(buf, "vlan_file") == 0) {