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,22 +143,24 @@ function config_init(uci)
}
for (let name, data in sections.vlan) {
if (!data.iface || !vifs[data.iface])
continue;
for (let vif in vifs[data.iface]) {
let dev = devices[vif.device];
let handler = handlers[vif.device];
if (!dev || !handler)
for (let iface, iface_vifs in vifs) {
if (data.iface && data.iface != iface)
continue;
let config = parse_attribute_list(data, handler.vlan);
for (let vif in iface_vifs) {
let dev = devices[vif.device];
let handler = handlers[vif.device];
if (!dev || !handler)
continue;
let vlan = {
name,
config
};
push(vif.vlan, vlan);
let config = parse_attribute_list(data, handler.vlan);
let vlan = {
name,
config
};
push(vif.vlan, vlan);
}
}
}