wifi-scripts: iface should be optional in wifi-station definition

Similar to "wifi-scripts: iface should be optional in wifi-vlan definition"
(98435a3), wifi-station iface should also be optional. By default, it is
supposed to match all interfaces if omitted.

Fixes: https://github.com/openwrt/openwrt/issues/20705
Signed-off-by: Rany Hany <rany_hany@riseup.net>
Link: https://github.com/openwrt/openwrt/pull/20694
Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
Rany Hany 2025-11-16 14:37:49 +00:00 committed by Robert Marko
parent 63c146a464
commit e740139302

View file

@ -214,10 +214,11 @@ function config_init(uci)
}
for (let name, data in sections.station) {
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)
@ -232,6 +233,7 @@ function config_init(uci)
push(vif.sta, sta);
}
}
}
let udata = ubus.call({
object: "service",