wifi-scripts: iface should be optional in wifi-vlan definition
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run

The option iface should be optional according to the description
of /etc/config/wireless in order to avoid repeating the definition
for each virtual interface.

Signed-off-by: Tobias Waldvogel <tobias.waldvogel@gmail.com>
This commit is contained in:
Tobias Waldvogel 2025-08-14 10:09:58 +02:00 committed by Felix Fietkau
parent a15d07f74b
commit 98435a37a7

View file

@ -143,10 +143,11 @@ function config_init(uci)
}
for (let name, data in sections.vlan) {
if (!data.iface || !vifs[data.iface])
for (let iface, iface_vifs in vifs) {
if (data.iface && data.iface != iface)
continue;
for (let vif in vifs[data.iface]) {
for (let vif in iface_vifs) {
let dev = devices[vif.device];
let handler = handlers[vif.device];
if (!dev || !handler)
@ -161,6 +162,7 @@ function config_init(uci)
push(vif.vlan, vlan);
}
}
}
for (let name, data in sections.station) {
if (!data.iface || !vifs[data.iface])