Skip to content

Commit

Permalink
Merge pull request #1257 from jasonlyc/bug_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MelvinTo authored May 11, 2024
2 parents 9304645 + 5336bc0 commit 696845d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugins/hostapd/hostapd_plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,6 @@ class HostapdPlugin extends Plugin {
}

async apply() {
if (platform.wifiSD && !await r.verifyPermanentMAC(this.name)) {
this.log.error(`Permanent MAC address of ${this.name} is not valid, ignore it`);
return;
}
const parameters = pluginConfig.default ? JSON.parse(JSON.stringify(pluginConfig.default)) : {};
const params = this.networkConfig.params || {};
parameters.interface = this.name;
Expand All @@ -101,6 +97,10 @@ class HostapdPlugin extends Plugin {
}
parameters.bridge = this.networkConfig.bridge;
}
if (platform.wifiSD && !await r.verifyPermanentMAC(this.name)) {
this.log.error(`Permanent MAC address of ${this.name} is not valid, ignore it`);
return;
}

if (params.ht_capab && !Array.isArray(params.ht_capab)) delete params.ht_capab

Expand Down
1 change: 1 addition & 0 deletions util/firerouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ async function verifyPermanentMAC(iface) {
});
if (pmac && (pmac.toUpperCase().startsWith("20:6D:31:") || pmac.toUpperCase().startsWith("22:6D:31:"))) // Wi-Fi SD may have a private permanent MAC address on wlan1
return true;
log.error(`Permanent MAC address of ${iface} is invalid: ${pmac}`);
return false;
}

Expand Down

0 comments on commit 696845d

Please sign in to comment.