From 23cb405565539c2fa0c3db9eba052afce343f8a8 Mon Sep 17 00:00:00 2001 From: Chris Buechler Date: Tue, 10 Mar 2015 20:21:09 -0500 Subject: [PATCH] Check for not up, rather than down, as there are a variety of potential statuses that are not up. Ticket #4502 --- etc/inc/gwlb.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc index 68af1ffad5..f65605fc76 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