summaryrefslogtreecommitdiffstats
path: root/etc
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 /etc
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.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/gwlb.inc10
-rw-r--r--etc/inc/interfaces.inc2
2 files changed, 8 insertions, 4 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];
}
OpenPOWER on IntegriCloud