From 2e76e612e0b41081749ad1f1ca68bec041918c1b Mon Sep 17 00:00:00 2001 From: Seth Mos Date: Tue, 8 Jul 2008 08:10:51 +0000 Subject: Switch over to interface_has_gateway() for gateway detection --- usr/local/www/status_rrd_graph.php | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'usr/local/www/status_rrd_graph.php') diff --git a/usr/local/www/status_rrd_graph.php b/usr/local/www/status_rrd_graph.php index 45068fe..af6cc42 100755 --- a/usr/local/www/status_rrd_graph.php +++ b/usr/local/www/status_rrd_graph.php @@ -194,10 +194,7 @@ include("head.inc"); case "outbound": /* only show interfaces with a gateway */ $optionc = "$optionc[0]"; - $friendly = convert_friendly_interface_to_friendly_descr(strtolower($optionc)); - $realif = convert_friendly_interface_to_real_interface_name(strtolower($optionc)); - $monitorip = get_interface_gateway(strtolower($optionc)); - if($monitorip == "") { + if(!interface_has_gateway($optionc)) { continue 2; } if(! preg_match("/($optionc)[-.]/i", $curdatabase)) { @@ -249,12 +246,7 @@ include("head.inc"); $replace = array(" :: ", "", $friendly); switch($curoption) { case "outbound": - /* only show interfaces with a gateway */ - $optionc = "$optionc[0]"; - $friendly = convert_friendly_interface_to_friendly_descr(strtolower($optionc)); - $realif = convert_friendly_interface_to_real_interface_name(strtolower($optionc)); - $monitorip = get_interface_gateway(strtolower($optionc)); - if($monitorip == "") { + if(!interface_has_gateway($optionc)) { continue 2; } if(! stristr($curdatabase, $optionc)) { -- cgit v1.1