summaryrefslogtreecommitdiffstats
path: root/etc/inc/gwlb.inc
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/inc/gwlb.inc
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/inc/gwlb.inc')
-rw-r--r--etc/inc/gwlb.inc10
1 files changed, 7 insertions, 3 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
+?>
OpenPOWER on IntegriCloud