hostapd: add patch for disabling automatic bridging of vlan interfaces
[openwrt/staging/chunkeey.git] / package / network / services / hostapd / patches / 710-vlan_no_bridge.patch
1 --- a/src/ap/ap_config.h
2 +++ b/src/ap/ap_config.h
3 @@ -115,6 +115,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 @@ -466,6 +466,9 @@ void vlan_newlink(const char *ifname, st
14
15 wpa_printf(MSG_DEBUG, "VLAN: vlan_newlink(%s)", ifname);
16
17 + if (hapd->conf->ssid.vlan_no_bridge)
18 + return;
19 +
20 for (vlan = hapd->conf->vlan; vlan; vlan = vlan->next) {
21 if (vlan->configured ||
22 os_strcmp(ifname, vlan->ifname) != 0)
23 --- a/hostapd/config_file.c
24 +++ b/hostapd/config_file.c
25 @@ -3400,6 +3400,8 @@ static int hostapd_config_fill(struct ho
26 #ifndef CONFIG_NO_VLAN
27 } else if (os_strcmp(buf, "dynamic_vlan") == 0) {
28 bss->ssid.dynamic_vlan = atoi(pos);
29 + } else if (os_strcmp(buf, "vlan_no_bridge") == 0) {
30 + bss->ssid.vlan_no_bridge = atoi(pos);
31 } else if (os_strcmp(buf, "per_sta_vif") == 0) {
32 bss->ssid.per_sta_vif = atoi(pos);
33 } else if (os_strcmp(buf, "vlan_file") == 0) {