diff --git a/plugins/hostapd/hostapd_plugin.js b/plugins/hostapd/hostapd_plugin.js index 05ef8ce0..bb0106c4 100644 --- a/plugins/hostapd/hostapd_plugin.js +++ b/plugins/hostapd/hostapd_plugin.js @@ -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; @@ -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 diff --git a/util/firerouter.js b/util/firerouter.js index bb3d707f..5532a474 100644 --- a/util/firerouter.js +++ b/util/firerouter.js @@ -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; }