]> git.ipfire.org Git - thirdparty/openwrt.git/commit
wifi-scripts: fix broken match all case for wifi-vlan
authorRany Hany <rany_hany@riseup.net>
Sat, 29 Nov 2025 10:37:22 +0000 (12:37 +0200)
committerRobert Marko <robimarko@gmail.com>
Mon, 15 Dec 2025 11:31:14 +0000 (12:31 +0100)
commitb13c6a732a7d289a05d53aa1d7f6ef2aebfeb8e5
treefdf9d85240bc301721e806505b76fb6ef4337b8f
parent87fd61bd029b1452dbba208f1153d0d9f8c2c87e
wifi-scripts: fix broken match all case for wifi-vlan

When iface is omitted, wifi-vlan will apply to all interfaces.
However, netifd.set_vlan call is not successful as it assumes
that every wifi-vlan section corresponds to one VIF.

For this reason in the wifi-vlan case (cur_type == "vlan")
we create a composite key in the form `${vif.name}/${vlan.name}`
allowing the same vlan section to correspond to multiple VAPs.
`/` was decided as a delimiter as it is an invalid character
for a network interface name and UCI identifier; so it is
impossible for it to cause conflicts.

It was verified that the `ubus call network.wireless status`
works as expected with this change. Moreover, wifi-station
is not susceptible to this problem.

This also means that it is now possible for wifi-vlan
to support `list` iface similar to old shell-based wifi-scripts.
This will be done in a follow-up commit.

Fixes: 98435a37a7 ("wifi-scripts: iface should be optional in wifi-vlan definition")
Signed-off-by: Rany Hany <rany_hany@riseup.net>
Link: https://github.com/openwrt/openwrt/pull/20977
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 211b11a56e6e6a45d2e3a2a733e78f3e9dd14a16)
package/network/config/wifi-scripts/files/lib/netifd/wireless-device.uc