]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
wifi-scripts: use the base phy name for config_get_macaddr_list
authorFelix Fietkau <nbd@nbd.name>
Fri, 10 Jul 2026 12:46:58 +0000 (14:46 +0200)
committerFelix Fietkau <nbd@nbd.name>
Thu, 16 Jul 2026 09:50:22 +0000 (11:50 +0200)
phydev.name is already radio-suffixed, and the hostapd handler re-applies
the suffix, so on multi-radio phys the lookup missed and the returned MAC
list was always empty, letting wdev.uc reuse a MAC hostapd had reserved for
an AP BSS. Pass the base phy and radio index.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/network/config/wifi-scripts/files/usr/share/hostap/wdev.uc

index a4f9bf7b8448cca2d04f17b8e4e098c7c9adda54..883aa2640ca21a08634395179babdb6086f7daca 100644 (file)
@@ -142,7 +142,7 @@ const commands = {
                drop_inactive(config.data);
 
                let ubus = libubus.connect();
-               let data = ubus.call("hostapd", "config_get_macaddr_list", { phy: phydev.name, radio: phydev.radio ?? -1 });
+               let data = ubus.call("hostapd", "config_get_macaddr_list", { phy: phydev.phy, radio: int(phydev.radio ?? -1) });
                let macaddr_list = [];
                if (type(data) == "object" && data.macaddr)
                        macaddr_list = data.macaddr;