summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-09-13 16:02:23 +0000
committerErmal <eri@pfsense.org>2010-09-13 16:02:23 +0000
commitc65e1e0da7df7b367ff97e89dad16f602571cecb (patch)
tree5333da6fb807bac46a98c801c0c1be7dfb3e26aa
parent4b4d550a5a95db9c1cf80930fdbae8f9db91f8b8 (diff)
downloadpfsense-c65e1e0da7df7b367ff97e89dad16f602571cecb.zip
pfsense-c65e1e0da7df7b367ff97e89dad16f602571cecb.tar.gz
Ticket #876. Actually use the friendly name for the key of the array returned by return_gateways_array() so the dynamic gateway and status pages work correctly.
-rw-r--r--etc/inc/gwlb.inc14
-rwxr-xr-xusr/local/www/system_gateways.php16
2 files changed, 9 insertions, 21 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc
index 959b200..ea303e0 100644
--- a/etc/inc/gwlb.inc
+++ b/etc/inc/gwlb.inc
@@ -330,14 +330,14 @@ function return_gateways_array($disabled = false) {
}
/* retrieve a proper monitor IP? */
- $interface = $config['interfaces'][$ifname];
- if(is_ipaddr($interface['monitorip'])) {
- $gateway['monitor'] = $interface['monitorip'];
- } else {
+ $ifcfg =& $config['interfaces'][$ifname];
+ if (is_ipaddr($ifcfg['monitorip']))
+ $gateway['monitor'] = $ifcfg['monitorip'];
+ else
$gateway['monitor'] = $gateway['gateway'];
- }
- $gateway['descr'] = "Interface $ifname Dynamic Gateway";
- $gateways_arr[$ifname] = $gateway;
+
+ $gateway['descr'] = "Interface {$friendly} Dynamic Gateway";
+ $gateways_arr[$friendly] = $gateway;
}
return($gateways_arr);
diff --git a/usr/local/www/system_gateways.php b/usr/local/www/system_gateways.php
index d789d76..0e3bc43 100755
--- a/usr/local/www/system_gateways.php
+++ b/usr/local/www/system_gateways.php
@@ -176,29 +176,17 @@ include("head.inc");
</td>
<td class="listr" ondblclick="document.location='system_gateways_edit.php?id=<?=$i;?>';">
<?php
- echo htmlspecialchars(convert_real_interface_to_friendly_descr($gateway['interface']));
+ echo htmlspecialchars(convert_friendly_interface_to_friendly_descr($gateway['friendlyiface']));
?>
</td>
<td class="listr" ondblclick="document.location='system_gateways_edit.php?id=<?=$i;?>';">
<?php
- if(isset($gateway['interfacegateway'])) {
- echo strtoupper($gateway['interface']) . " ";
- } else {
- if(is_numeric($gateway['attribute']) && ($a_gateway_item[$gateway['attribute']]['gateway'] == "dynamic")) {
- echo "dynamic";
- } else {
- echo $gateway['gateway'] . " ";
- }
- }
+ echo $gateway['gateway'] . " ";
?>
</td>
<td class="listr" ondblclick="document.location='system_gateways_edit.php?id=<?=$i;?>';">
<?php
- if(is_numeric($gateway['attribute']) && ($a_gateway_item[$gateway['attribute']]['monitor'] == "dynamic")) {
- echo "dynamic";
- } else {
echo htmlspecialchars($gateway['monitor']) . " ";
- }
?>
</td>
<?php if($gateway['attribute'] == "system") : ?>
OpenPOWER on IntegriCloud