mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 08:34:39 +00:00
system: gateway_items are not dynamic
This commit is contained in:
parent
c901a00eb6
commit
60966cdaa2
@ -205,7 +205,8 @@ class Gateways
|
||||
"name" => strtoupper("{$descr}_{$ctype}"),
|
||||
"descr" => "Interface " . strtoupper("{$descr}_{$ctype}") . " Gateway",
|
||||
"monitor_disable" => true, // disable monitoring by default
|
||||
"if" => $ifcfg['if']
|
||||
"if" => $ifcfg['if'],
|
||||
"dynamic" => true,
|
||||
];
|
||||
// locate interface gateway settings
|
||||
if (!empty($dynamic_gw[$ifname])) {
|
||||
@ -217,7 +218,6 @@ class Gateways
|
||||
}
|
||||
}
|
||||
}
|
||||
$thisconf['dynamic'] = true;
|
||||
// dynamic gateways dump their address in /tmp/[IF]_router[FSUFFIX]
|
||||
if (file_exists("/tmp/{$ifcfg['if']}_router".$fsuffix)) {
|
||||
$thisconf['gateway'] = trim(@file_get_contents("/tmp/{$ifcfg['if']}_router".$fsuffix));
|
||||
@ -232,6 +232,9 @@ class Gateways
|
||||
// gateway should only contain a valid address, make sure its empty
|
||||
unset($thisconf['gateway']);
|
||||
$this->cached_gateways[$gwkey] = $thisconf;
|
||||
} elseif (empty($thisconf['dynamic'])) {
|
||||
$gwkey = $this->newKey($thisconf['priority'], !empty($thisconf['defaultgw']));
|
||||
$this->cached_gateways[$gwkey] = $thisconf;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user