[openwrt/openwrt] hostapd: fix bringing up vlan interfaces with the no-bridge option

LEDE Commits lede-commits at lists.infradead.org
Fri Jun 4 11:37:14 PDT 2021


nbd pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/89bd8607f8cdacea7e8d13c1233a2a8b13fdf64c

commit 89bd8607f8cdacea7e8d13c1233a2a8b13fdf64c
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Thu Jun 3 15:21:00 2021 +0200

    hostapd: fix bringing up vlan interfaces with the no-bridge option
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../hostapd/patches/710-vlan_no_bridge.patch       | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/package/network/services/hostapd/patches/710-vlan_no_bridge.patch b/package/network/services/hostapd/patches/710-vlan_no_bridge.patch
index d5aa33520b..73db32e54a 100644
--- a/package/network/services/hostapd/patches/710-vlan_no_bridge.patch
+++ b/package/network/services/hostapd/patches/710-vlan_no_bridge.patch
@@ -10,16 +10,24 @@
  #define DYNAMIC_VLAN_NAMING_END 2
 --- a/src/ap/vlan_full.c
 +++ b/src/ap/vlan_full.c
-@@ -466,6 +466,9 @@ void vlan_newlink(const char *ifname, st
- 
- 	wpa_printf(MSG_DEBUG, "VLAN: vlan_newlink(%s)", ifname);
+@@ -475,6 +475,9 @@ void vlan_newlink(const char *ifname, st
+ 	if (!vlan)
+ 		return;
  
 +	if (hapd->conf->ssid.vlan_no_bridge)
-+		return;
++		goto out;
 +
- 	for (vlan = hapd->conf->vlan; vlan; vlan = vlan->next) {
- 		if (vlan->configured ||
- 		    os_strcmp(ifname, vlan->ifname) != 0)
+ 	vlan->configured = 1;
+ 
+ 	notempty = vlan->vlan_desc.notempty;
+@@ -506,6 +509,7 @@ void vlan_newlink(const char *ifname, st
+ 				    ifname, br_name, tagged[i], hapd);
+ 	}
+ 
++out:
+ 	ifconfig_up(ifname);
+ }
+ 
 --- a/hostapd/config_file.c
 +++ b/hostapd/config_file.c
 @@ -3366,6 +3366,8 @@ static int hostapd_config_fill(struct ho



More information about the lede-commits mailing list