diff options
author | Ermal <eri@pfsense.org> | 2010-09-16 16:49:38 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2010-09-16 16:49:38 +0000 |
commit | ef05ae5f7882e0783e13bfed9d32fbe620ced641 (patch) | |
tree | 53fcb5a34eabcd5ff8f36818c63466034b0026ba /etc/inc | |
parent | 7ec17767bf222e8fbcdb854c291372d119c1d50d (diff) | |
download | pfsense-ef05ae5f7882e0783e13bfed9d32fbe620ced641.zip pfsense-ef05ae5f7882e0783e13bfed9d32fbe620ced641.tar.gz |
Actually display a the right class for static gateways. Also fix whitespace
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/gwlb.inc | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc index 66014ff..43f7e20 100644 --- a/etc/inc/gwlb.inc +++ b/etc/inc/gwlb.inc @@ -270,16 +270,9 @@ function return_gateways_array($disabled = false) { $gateways_arr = array(); - /* Loop through all interfaces with a gateway and add it to a array */ - if ($disabled == false) { - $iflist = get_configured_interface_with_descr(); - } else { - $iflist = get_configured_interface_with_descr(false, true); - } - $i = 0; /* Process/add all the configured gateways. */ - if(is_array($config['gateways']['gateway_item'])) { + if (is_array($config['gateways']['gateway_item'])) { foreach($config['gateways']['gateway_item'] as $gateway) { if($gateway['gateway'] == "dynamic") { $gateway['gateway'] = get_interface_gateway($gateway['interface']); @@ -301,6 +294,12 @@ function return_gateways_array($disabled = false) { } } + /* Loop through all interfaces with a gateway and add it to a array */ + if ($disabled == false) + $iflist = get_configured_interface_with_descr(); + else + $iflist = get_configured_interface_with_descr(false, true); + /* Process/add dynamic gateways. */ foreach($iflist as $ifname => $friendly ) { if(! interface_has_gateway($ifname)) @@ -311,7 +310,7 @@ function return_gateways_array($disabled = false) { $gateway['gateway'] = get_interface_gateway($ifname, $gateway['dynamic']); $gateway['interface'] = get_real_interface($ifname); $gateway['friendlyiface'] = $ifname; - $gateway['name'] = "{$friendly}"; + $gateway['name'] = $friendly; $gateway['attribute'] = "system"; /* Loopback dummy for dynamic interfaces without a IP */ |