mirror of
https://github.com/openwrt/openwrt.git
synced 2025-02-16 07:30:31 +00:00
wifi-scripts: fix mac address allocation with macaddr_base set
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
The 00 address_mask needs to be inverted, otherwise the mac address allocation will modify the last byte instead of the first one. Signed-off-by: Felix Fietkau <nbd@nbd.name> (cherry picked from commit 1ee44825ad0d00527c8850446affc820d74c6e8b)
This commit is contained in:
parent
f47125f664
commit
7955545469
@ -213,9 +213,12 @@ const phy_proto = {
|
||||
if (!base_mask)
|
||||
return null;
|
||||
|
||||
if (base_mask == "00:00:00:00:00:00")
|
||||
base_mask = "ff:ff:ff:ff:ff:ff";
|
||||
|
||||
if (data.macaddr_base)
|
||||
base_addr = data.macaddr_base;
|
||||
else if (base_mask == "00:00:00:00:00:00" &&
|
||||
else if (base_mask == "ff:ff:ff:ff:ff:ff" &&
|
||||
(radio_idx > 0 || idx >= num_global)) {
|
||||
let addrs = split(phy_sysfs_file(phy, "addresses"), "\n");
|
||||
|
||||
@ -227,8 +230,6 @@ const phy_proto = {
|
||||
} else {
|
||||
if (idx < length(addrs))
|
||||
return addrs[idx];
|
||||
|
||||
base_mask = "ff:ff:ff:ff:ff:ff";
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user