Files
wlan-ap/feeds/hostapd/hostapd/patches/790-wired-dynamic-vlan.patch
2024-09-22 13:45:23 +02:00

34 lines
1.1 KiB
Diff

Index: hostapd-2021-02-20-59e9794c/src/ap/vlan_init.c
===================================================================
--- hostapd-2021-02-20-59e9794c.orig/src/ap/vlan_init.c
+++ hostapd-2021-02-20-59e9794c/src/ap/vlan_init.c
@@ -37,7 +37,14 @@ static int vlan_if_add(struct hostapd_da
}
#endif /* CONFIG_WEP */
- if (!vlan_exists)
+ if (!hapd->driver || !hapd->driver->if_add) {
+ char *dot = strstr(vlan->ifname, ".");
+ if (dot)
+ *dot = '\0';
+ ret = 0;
+ }
+
+ else if (!vlan_exists)
ret = hostapd_vlan_if_add(hapd, vlan->ifname);
else if (!existsok)
return -1;
Index: hostapd-2021-02-20-59e9794c/src/ap/vlan_init.c
===================================================================
--- hostapd-2021-02-20-59e9794c.orig/src/ap/vlan_init.c
+++ hostapd-2021-02-20-59e9794c/src/ap/vlan_init.c
@@ -59,7 +59,7 @@ static int vlan_if_add(struct hostapd_da
if (hapd->wpa_auth)
ret = wpa_auth_ensure_group(hapd->wpa_auth, vlan->vlan_id);
- if (!ret && !vlan_exists)
+ if (!ret && !vlan_exists && hapd->driver->if_add)
hostapd_ubus_add_vlan(hapd, vlan);
if (ret == 0)