summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2015-03-10 20:37:36 -0500
committerChris Buechler <cmb@pfsense.org>2015-03-10 20:37:36 -0500
commit9229598abb38c1083c3881d7ce57de6ac407fcb4 (patch)
tree879dc83fe15dfa8ce7a9fc4f115f527fbf295394
parent5fb0e30d28425dc8f276d6ac1b68a6143576a5e5 (diff)
downloadpfsense-9229598abb38c1083c3881d7ce57de6ac407fcb4.zip
pfsense-9229598abb38c1083c3881d7ce57de6ac407fcb4.tar.gz
Check for not up, rather than down, as there are a variety of potential
statuses that are not up. Ticket #4502
-rw-r--r--etc/inc/gwlb.inc6
1 files changed, 3 insertions, 3 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc
index 53e69eb..bb304ce 100644
--- a/etc/inc/gwlb.inc
+++ b/etc/inc/gwlb.inc
@@ -776,12 +776,12 @@ 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))
break;
@@ -1143,4 +1143,4 @@ function gateway_is_gwgroup_member($name) {
return $members;
}
-?>
+?> \ No newline at end of file
OpenPOWER on IntegriCloud