hostapd: fix bringing up vlan interfaces with the no-bridge option
authorFelix Fietkau <nbd@nbd.name>
Thu, 3 Jun 2021 13:21:00 +0000 (15:21 +0200)
committerFelix Fietkau <nbd@nbd.name>
Fri, 4 Jun 2021 18:36:42 +0000 (20:36 +0200)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/network/services/hostapd/patches/710-vlan_no_bridge.patch

index d5aa33520b6da027c2f96575af21774fbe57a196..73db32e54a6fd39fa6a25b065fbb1486d831ebb3 100644 (file)
  #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