diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc index f61c402304..4e3ea80878 100644 --- a/etc/inc/gwlb.inc +++ b/etc/inc/gwlb.inc @@ -225,13 +225,17 @@ function return_gateways_status() { return($status); } -function return_gateways_array() { +function return_gateways_array($disabled = false) { global $config; $gateways_arr = array(); /* Loop through all interfaces with a gateway and add it to a array */ - $iflist = get_configured_interface_with_descr(); + if ($disabled == false) + $iflist = get_configured_interface_with_descr(); + else + $iflist = get_configured_interface_with_descr(false, true); + foreach($iflist as $ifname => $friendly ) { if(interface_has_gateway($ifname)) { $gateway = array(); @@ -482,4 +486,4 @@ function get_interface_gateway($interface) { return $gw; } -?> \ No newline at end of file +?> diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 40d09471af..bc423c18ee 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -2276,7 +2276,7 @@ function convert_real_interface_to_friendly_descr($interface) { $ifdesc = convert_real_interface_to_friendly_interface_name("{$interface}"); if ($ifdesc) { - $iflist = get_configured_interface_with_descr(); + $iflist = get_configured_interface_with_descr(false, true); return $iflist[$ifdesc]; } diff --git a/usr/local/www/system_gateways.php b/usr/local/www/system_gateways.php index 39d6076cb0..f73357f164 100755 --- a/usr/local/www/system_gateways.php +++ b/usr/local/www/system_gateways.php @@ -44,7 +44,7 @@ require_once("functions.inc"); require_once("filter.inc"); require_once("shaper.inc"); -$a_gateways = return_gateways_array(); +$a_gateways = return_gateways_array(true); $a_gateways_arr = array(); foreach($a_gateways as $gw) { $a_gateways_arr[] = $gw;