From c33fd4cc0034a43292a43133a7449d2d4bc54f6b Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Fri, 11 Dec 2015 11:06:26 -0200 Subject: Fix typo, gateway entry in config has a field called monitor, not monitorip --- etc/inc/gwlb.inc | 8 ++++---- usr/local/www/status_gateways.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc index bb304ce..cfd61ca 100644 --- a/etc/inc/gwlb.inc +++ b/etc/inc/gwlb.inc @@ -405,14 +405,14 @@ function return_gateways_status($byname = false) { foreach($gateways_arr as $gwitem) { if(!isset($gwitem['monitor_disable'])) continue; - if(!is_ipaddr($gwitem['monitorip'])) { + if(!is_ipaddr($gwitem['monitor'])) { $realif = $gwitem['interface']; $tgtip = get_interface_gateway($realif); if (!is_ipaddr($tgtip)) $tgtip = "none"; $srcip = find_interface_ip($realif); } else { - $tgtip = $gwitem['monitorip']; + $tgtip = $gwitem['monitor']; $srcip = find_interface_ip($realif); } if($byname == true) @@ -429,7 +429,7 @@ function return_gateways_status($byname = false) { $status[$target]['loss'] = "100.0%"; $status[$target]['status'] = "down"; } else { - $status[$target]['monitorip'] = $tgtip; + $status[$target]['monitor'] = $tgtip; $status[$target]['srcip'] = $srcip; $status[$target]['name'] = $gwitem['name']; $status[$target]['lastcheck'] = date('r'); @@ -1143,4 +1143,4 @@ function gateway_is_gwgroup_member($name) { return $members; } -?> \ No newline at end of file +?> diff --git a/usr/local/www/status_gateways.php b/usr/local/www/status_gateways.php index a151788..afc73d5 100644 --- a/usr/local/www/status_gateways.php +++ b/usr/local/www/status_gateways.php @@ -92,7 +92,7 @@ include("head.inc"); -- cgit v1.1