Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,24 @@ export function prepare(data, phy, num_global_macaddr, macaddr_base) {
return;
}

if (num_global_macaddr != null && match(num_global_macaddr + "", /[^0-9]/)) {
warn("Invalid num_global_macaddr: ", num_global_macaddr, "\n");
return;
}

if (mac_idx != null && match(mac_idx + "", /[^0-9]/)) {
warn("Invalid mac_idx: ", mac_idx, "\n");
return;
}

let mbssid = data.mbssid ?? 0;
if (match(mbssid + "", /[^0-9]/)) {
warn("Invalid mbssid: ", mbssid, "\n");
return;
}

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=${mbssid} macaddr_base=${macaddr_base ?? ""}`);

data.macaddr = trim(pipe.read("all"), '\n');
pipe.close();
Expand Down
Loading