Project

General

Profile

« Previous | Next » 

Revision 23cb4055

Added by Chris Buechler over 10 years ago

Check for not up, rather than down, as there are a variety of potential
statuses that are not up. Ticket #4502

View differences:

etc/inc/gwlb.inc
843 843
		if (($gwsttng['ipprotocol'] == $ipprotocol) && isset($gwsttng['defaultgw'])) {
844 844
			$dfltgwfound = true;
845 845
			$dfltgwname = $gwname;
846
			if (!isset($gwsttng['monitor_disable']) && stristr($gateways_status[$gwname]['status'], "down")) {
846
			if (!isset($gwsttng['monitor_disable']) && $gateways_status[$gwname]['status'] != "none") {
847 847
				$dfltgwdown = true;
848 848
			}
849 849
		}
850 850
		/* Keep a record of the last up gateway */
851 851
		/* XXX: Blacklist lan for now since it might cause issues to those who have a gateway set for it */
852
		if (empty($upgw) && ($gwsttng['ipprotocol'] == $ipprotocol) && (isset($gwsttng['monitor_disable']) || !stristr($gateways_status[$gwname]['status'], "down")) && $gwsttng[$gwname]['friendlyiface'] != "lan") {
852
		if (empty($upgw) && ($gwsttng['ipprotocol'] == $ipprotocol) && (isset($gwsttng['monitor_disable']) || $gateways_status[$gwname]['status'] == "none") && $gwsttng[$gwname]['friendlyiface'] != "lan") {
853 853
			$upgw = $gwname;
854 854
		}
855 855
		if ($dfltgwdown == true && !empty($upgw)) {
......
1249 1249

  
1250 1250
	return $members;
1251 1251
}
1252
?>
1252
?>

Also available in: Unified diff