mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Check for not up, rather than down, as there are a variety of potential
statuses that are not up. Ticket #4502
This commit is contained in:
parent
34ba4e5d32
commit
23cb405565
@ -843,13 +843,13 @@ function fixup_default_gateway($ipprotocol, $gateways_status, $gateways_arr) {
|
||||
if (($gwsttng['ipprotocol'] == $ipprotocol) && isset($gwsttng['defaultgw'])) {
|
||||
$dfltgwfound = true;
|
||||
$dfltgwname = $gwname;
|
||||
if (!isset($gwsttng['monitor_disable']) && stristr($gateways_status[$gwname]['status'], "down")) {
|
||||
if (!isset($gwsttng['monitor_disable']) && $gateways_status[$gwname]['status'] != "none") {
|
||||
$dfltgwdown = true;
|
||||
}
|
||||
}
|
||||
/* Keep a record of the last up gateway */
|
||||
/* XXX: Blacklist lan for now since it might cause issues to those who have a gateway set for it */
|
||||
if (empty($upgw) && ($gwsttng['ipprotocol'] == $ipprotocol) && (isset($gwsttng['monitor_disable']) || !stristr($gateways_status[$gwname]['status'], "down")) && $gwsttng[$gwname]['friendlyiface'] != "lan") {
|
||||
if (empty($upgw) && ($gwsttng['ipprotocol'] == $ipprotocol) && (isset($gwsttng['monitor_disable']) || $gateways_status[$gwname]['status'] == "none") && $gwsttng[$gwname]['friendlyiface'] != "lan") {
|
||||
$upgw = $gwname;
|
||||
}
|
||||
if ($dfltgwdown == true && !empty($upgw)) {
|
||||
@ -1249,4 +1249,4 @@ function gateway_is_gwgroup_member($name) {
|
||||
|
||||
return $members;
|
||||
}
|
||||
?>
|
||||
?>
|
||||
Loading…
Reference in New Issue
Block a user