Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync gold 1.979 staging #1262

Merged
merged 25 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
768772b
add NEED_FIRESTATUS for goldpro platform
jasonlyc Apr 29, 2024
770fd49
Merge pull request #1250 from jasonlyc/bug_fix
MelvinTo Apr 29, 2024
3b7cef7
verify MAC OUI of wifi interface
jasonlyc May 6, 2024
239bdb3
Merge pull request #1252 from jasonlyc/bug_fix
MelvinTo May 6, 2024
d754117
only check wifi permanent mac on wifi SD
jasonlyc May 6, 2024
d2d8515
Merge pull request #1253 from jasonlyc/bug_fix
MelvinTo May 6, 2024
4c0f14b
Fix wan failover route
xinnige Apr 3, 2024
9888fc3
Merge pull request #1251 from xinnige/3411_refine_route_rule
MelvinTo May 8, 2024
b08d493
Fix flush empty table
xinnige May 8, 2024
2e9016b
Merge pull request #1254 from xinnige/3411_fix_flush_empty_route
jasonlyc May 8, 2024
3895dcf
timeout BLE on GoldPro
drahnieR May 9, 2024
54fd2ac
Merge pull request #1255 from drahnieR/firereset
MelvinTo May 9, 2024
ca528e3
do not adopt address from ipv6 ra is prefix length is less than 64
jasonlyc May 10, 2024
9304645
Merge pull request #1256 from jasonlyc/bug_fix
MelvinTo May 10, 2024
5336bc0
check wifi permanent mac after subscribe changes in hostapd plugin
jasonlyc May 11, 2024
696845d
Merge pull request #1257 from jasonlyc/bug_fix
MelvinTo May 11, 2024
5500878
Fix main route update
xinnige May 11, 2024
44159b6
Fix dns route update
xinnige May 13, 2024
c06cf58
Merge pull request #1258 from xinnige/fix/3411_pppoe_main_route
jasonlyc May 13, 2024
7d7fc0f
enable rx-udp-gro-forwarding on pppoe interface
jasonlyc May 15, 2024
eea7b9d
Merge pull request #1259 from jasonlyc/bug_fix
MelvinTo May 15, 2024
78897c8
make BLUETOOTH_TIMEOUT universal default
drahnieR May 15, 2024
5201409
Merge pull request #1260 from drahnieR/firereset
MelvinTo May 15, 2024
4375c45
customize rps_cpus of pppoe on goldpro
jasonlyc May 16, 2024
51d18d7
Merge pull request #1261 from jasonlyc/bug_fix
MelvinTo May 16, 2024
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
3 changes: 3 additions & 0 deletions config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@
"file_path": "./routing/routing_plugin.js",
"config_path": "routing",
"category": "routing",
"config": {
"smooth_failover": true
},
"init_seq": 5
},
{
Expand Down
6 changes: 6 additions & 0 deletions platform/goldpro/platform.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
NETWORK_SETUP=yes
NEED_FIRESTATUS=true
BLUETOOTH_TIMEOUT=3600

function get_pppoe_rps_cpus {
echo "e"
}

function run_horse_light {
flash_interval=${1:-2}
Expand Down
2 changes: 1 addition & 1 deletion platform/platform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FW_PLATFORM_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"

UNAME=$(uname -m)
NETWORK_SETUP=yes
BLUETOOTH_TIMEOUT=0
BLUETOOTH_TIMEOUT=3600

function run_horse_light {
return
Expand Down
4 changes: 4 additions & 0 deletions plugins/hostapd/hostapd_plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,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
4 changes: 2 additions & 2 deletions plugins/interface/intf_base_plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ class InterfaceBasePlugin extends Plugin {

const dnsResult = await this.getDNSResult(u.hostname).catch((err) => false);
if(!dnsResult) {
this.log.error("failed to resolve dns on domain", u.hostname);
this.log.error("failed to resolve dns on domain", u.hostname, 'on', this.name);
delete this.isHttpTesting[defaultTestURL];
return null;
}
Expand Down Expand Up @@ -1174,7 +1174,7 @@ class InterfaceBasePlugin extends Plugin {
}

const result = await Promise.any(promises).catch((err) => {
this.log.error("no valid dns from any nameservers", err.message);
this.log.error("no valid dns from any nameservers on", this.name, err.message);
return null;
});
return result;
Expand Down
8 changes: 8 additions & 0 deletions plugins/interface/wlan_intf_plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,14 @@ class WLANInterfacePlugin extends InterfaceBasePlugin {
return true;
}

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;
}
await super.apply();
}

async flush() {
await super.flush();

Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Plugin {

init(pluginConfig) {
this.pluginConfig = pluginConfig;
this.log.info(`Initializing Plugin ${this.constructor.name}...`);
this.log.info(`Initializing Plugin ${this.constructor.name} ${JSON.stringify(pluginConfig)}...`);
}

configure(networkConfig) {
Expand Down
7 changes: 5 additions & 2 deletions plugins/plugin_loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ async function initPlugins() {
log.info("Plugin initialized", pluginConfs);
}

function createPluginInstance(category, name, constructor) {
function createPluginInstance(category, name, constructor, config=null) {
let instance = pluginCategoryMap[category] && pluginCategoryMap[category][name];
if (instance)
return instance;
Expand All @@ -83,6 +83,9 @@ function createPluginInstance(category, name, constructor) {
instance = new constructor(name);
instance.name = name;
pluginCategoryMap[category][name] = instance;
if (config) {
instance.init(config);
}
log.info("Instance created", instance.name);
return instance;
}
Expand Down Expand Up @@ -179,7 +182,7 @@ async function reapply(config, dryRun = false) {
}
if (value) {
for (let name in value) {
const instance = createPluginInstance(pluginConf.category, name, pluginConf.c);
const instance = createPluginInstance(pluginConf.category, name, pluginConf.c, pluginConf.config);
if (!instance)
continue;
instance._mark = 1;
Expand Down
Loading
Loading