Skip to content

Commit 1ead4e6

Browse files
rany2robimarko
authored andcommitted
wifi-scripts: add support for using list for iface in wifi-station/vlan
This is a trivial change to allow users to use 'list' on iface. Old wifi-scripts already implements this, so this just ensures that shell-based and ucode wifi-scripts are on-par with each other. Signed-off-by: Rany Hany <[email protected]> Link: openwrt/openwrt#20977 Signed-off-by: Robert Marko <[email protected]>
1 parent 211b11a commit 1ead4e6

File tree

1 file changed

+4
-2
lines changed
  • package/network/config/wifi-scripts/files/lib/netifd

1 file changed

+4
-2
lines changed

package/network/config/wifi-scripts/files/lib/netifd/wireless.uc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,9 @@ function config_init(uci)
192192
}
193193
194194
for (let name, data in sections.vlan) {
195+
let ifaces = parse_array(data.iface);
195196
for (let iface, iface_vifs in vifs) {
196-
if (data.iface && data.iface != iface)
197+
if (length(ifaces) && index(ifaces, iface) < 0)
197198
continue;
198199
199200
for (let vif in iface_vifs) {
@@ -214,8 +215,9 @@ function config_init(uci)
214215
}
215216
216217
for (let name, data in sections.station) {
218+
let ifaces = parse_array(data.iface);
217219
for (let iface, iface_vifs in vifs) {
218-
if (data.iface && data.iface != iface)
220+
if (length(ifaces) && index(ifaces, iface) < 0)
219221
continue;
220222
221223
for (let vif in iface_vifs) {

0 commit comments

Comments
 (0)