wifi-scripts: ucode: fix invalid generated MAC address
macaddr_base can be NULL, in which case it needs to be passed as an empty string Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
165ca3f375
commit
ba2ae60a00
1 changed files with 1 additions and 1 deletions
|
@ -231,7 +231,7 @@ function macaddr_random() {
|
||||||
let mac_idx = 0;
|
let mac_idx = 0;
|
||||||
export function prepare(data, phy, num_global_macaddr, macaddr_base) {
|
export function prepare(data, phy, num_global_macaddr, macaddr_base) {
|
||||||
if (!data.macaddr) {
|
if (!data.macaddr) {
|
||||||
let pipe = fs.popen(`ucode /usr/share/hostap/wdev.uc ${phy} get_macaddr id=${mac_idx} num_global=${num_global_macaddr} mbssid=${data.mbssid ?? 0} macaddr_base=${macaddr_base}`);
|
let pipe = fs.popen(`ucode /usr/share/hostap/wdev.uc ${phy} get_macaddr id=${mac_idx} num_global=${num_global_macaddr} mbssid=${data.mbssid ?? 0} macaddr_base=${macaddr_base ?? ""}`);
|
||||||
|
|
||||||
data.macaddr = trim(pipe.read("all"), '\n');
|
data.macaddr = trim(pipe.read("all"), '\n');
|
||||||
pipe.close();
|
pipe.close();
|
||||||
|
|
Loading…
Reference in a new issue