]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
wifi-scripts: fix macaddr check in mac80211.uc
authorHarin Lee <me@harin.net>
Wed, 24 Dec 2025 19:15:25 +0000 (04:15 +0900)
committerFelix Fietkau <nbd@nbd.name>
Mon, 16 Feb 2026 08:20:29 +0000 (08:20 +0000)
This fixes a simple logic error in the macaddr existence check in mac80211.uc.

Signed-off-by: Harin Lee <me@harin.net>
Link: https://github.com/openwrt/openwrt/pull/21277
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 2ebcda1ea6b757864c4700e543a9767752ca766e)

package/network/config/wifi-scripts/files/lib/wifi/mac80211.uc

index 0156906725567f2453a54b90a2dc9a5e6ded79ee..d61786fa65023521d16fdf6bc499c2d26ee2d275 100644 (file)
@@ -20,7 +20,7 @@ function radio_exists(path, macaddr, phy, radio) {
                        continue;
                if (radio != null && int(s.radio) != radio)
                        continue;
-               if (s.macaddr & lc(s.macaddr) == lc(macaddr))
+               if (s.macaddr && lc(s.macaddr) == lc(macaddr))
                        return true;
                if (s.phy == phy)
                        return true;