summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2015-03-10 20:21:09 -0500
committerChris Buechler <cmb@pfsense.org>2015-03-10 20:21:09 -0500
commit23cb405565539c2fa0c3db9eba052afce343f8a8 (patch)
tree4043c1e8530b12816bf9e50399150f5edd998cf2
parent34ba4e5d32d5a371f2ae3ee6b0d38393d62925f8 (diff)
downloadpfsense-23cb405565539c2fa0c3db9eba052afce343f8a8.zip
pfsense-23cb405565539c2fa0c3db9eba052afce343f8a8.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 68af1ff..f65605f 100644
--- a/etc/inc/gwlb.inc
+++ b/etc/inc/gwlb.inc
@@ -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;
}
-?>
+?> \ No newline at end of file
OpenPOWER on IntegriCloud