Hi,

it looks like that data.macaddr_base is always true even if no macaddr_base is 
set:

--- a/package/network/config/wifi-scripts/files/usr/share/hostap/common.uc
+++ b/package/network/config/wifi-scripts/files/usr/share/hostap/common.uc
@@ -213,7 +213,9 @@ const phy_proto = {
                if (!base_mask)
                        return null;
- if (base_mask == "00:00:00:00:00:00" &&
+               if (data.macaddr_base)
+                       base_addr = data.macaddr_base;
+               else if (base_mask == "00:00:00:00:00:00" &&
                    (radio_idx > 0 || idx >= num_global)) {
                        let addrs = split(phy_sysfs_file(phy, "addresses"), 
"\n");
Currently I'm using the following workaround:

--- a/package/network/config/wifi-scripts/files/usr/share/hostap/common.uc
+++ b/package/network/config/wifi-scripts/files/usr/share/hostap/common.uc
@@ -213,7 +213,9 @@ const phy_proto = {
                if (!base_mask)
                        return null;
- if (base_mask == "00:00:00:00:00:00" &&
+               if (data.macaddr_base != "null")
+                       base_addr = data.macaddr_base;
+               else if (base_mask == "00:00:00:00:00:00" &&
                    (radio_idx > 0 || idx >= num_global)) {
                        let addrs = split(phy_sysfs_file(phy, "addresses"), 
"\n");

Using of 'data.macaddr_base ?? 0' doesn't seem to work.
Regards,
Hartmut

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to