mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 01:24:38 +00:00
gwlb, gateway switch shouldn't be in the for loop
This commit is contained in:
parent
9d239330db
commit
ce8ef9930b
@ -738,14 +738,16 @@ function fixup_default_gateway($gateways_status, $gateways_arr)
|
||||
if (empty($upgw) && $gwsttng[$gwname]['friendlyiface'] != "lan" &&
|
||||
(isset($gwsttng['monitor_disable']) || !stristr($gateways_status[$gwname]['status'], "down"))) {
|
||||
$upgw = $gwname;
|
||||
}
|
||||
if (!$dfltgwup && !empty($upgw)) {
|
||||
// switch gateway
|
||||
$dfltgwname = $upgw;
|
||||
break;
|
||||
if (!$dfltgwup) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!$dfltgwup && !empty($upgw)) {
|
||||
// switch gateway
|
||||
$dfltgwname = $upgw;
|
||||
}
|
||||
if ($gateways_arr[$dfltgwname]['gateway'] == "dynamic") {
|
||||
if ($ipprotocol == 'inet') {
|
||||
$gwip = get_interface_gateway($gateways_arr[$dfltgwname]['friendlyiface']);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user