Commit ce8ef993 authored by Ad Schellevis's avatar Ad Schellevis

gwlb, gateway switch shouldn't be in the for loop

parent 9d239330
......@@ -738,13 +738,15 @@ 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) {
break;
}
}
}
}
if (!$dfltgwup && !empty($upgw)) {
// switch gateway
$dfltgwname = $upgw;
break;
}
}
}
if ($gateways_arr[$dfltgwname]['gateway'] == "dynamic") {
if ($ipprotocol == 'inet') {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment