summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2009-11-25 18:18:51 +0000
committerErmal Luçi <eri@pfsense.org>2009-11-25 18:18:51 +0000
commitc795339e573389fa10ca8ea307b2c45f56a3700b (patch)
treea4ca0c5dbf3af3e80c4cd8000354adbb89939146
parent392cd413c1c6269d027e2da15f466928e6715271 (diff)
downloadpfsense-c795339e573389fa10ca8ea307b2c45f56a3700b.zip
pfsense-c795339e573389fa10ca8ea307b2c45f56a3700b.tar.gz
Resolves #175. Return description even for disabled interfaces. Teach the return_gateways_array() to return status for disabled interfaces if the caller requests it.
-rw-r--r--etc/inc/gwlb.inc10
-rw-r--r--etc/inc/interfaces.inc2
-rwxr-xr-xusr/local/www/system_gateways.php2
3 files changed, 9 insertions, 5 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc
index f61c402..4e3ea80 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 40d0947..bc423c1 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 39d6076..f73357f 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;
OpenPOWER on IntegriCloud