diff options
| author | Rany Hany | 2025-11-16 14:37:49 +0000 |
|---|---|---|
| committer | Robert Marko | 2025-11-25 10:45:24 +0000 |
| commit | e7401393026c742d143aa770a7617b3996430ea0 (patch) | |
| tree | c505643f4deadc52c333425ba6408cfa2dcc1155 | |
| parent | 63c146a464da4fe72a4eb82ad6fe6da826a5dd43 (diff) | |
| download | openwrt-e7401393026c742d143aa770a7617b3996430ea0.tar.gz | |
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>
| -rw-r--r-- | package/network/config/wifi-scripts/files/lib/netifd/wireless.uc | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc b/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc index 5f64104c8b..ad935ce414 100644 --- a/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc +++ b/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc @@ -214,22 +214,24 @@ function config_init(uci) } for (let name, data in sections.station) { - 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.station); + for (let vif in iface_vifs) { + let dev = devices[vif.device]; + let handler = handlers[vif.device]; + if (!dev || !handler) + continue; - let sta = { - name, - config - }; - push(vif.sta, sta); + let config = parse_attribute_list(data, handler.station); + + let sta = { + name, + config + }; + push(vif.sta, sta); + } } } |