summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-06-18 21:15:46 +0000
committerErmal <eri@pfsense.org>2010-06-18 21:15:46 +0000
commit6f77aca537a291503a873e6c4aa0e4f2dd6128a2 (patch)
treefd8806c0c752eadda12a348576f49f4b6635b76c
parent3a9eb3c90848a78bbd5ae2c6285343e338bc6bb3 (diff)
downloadpfsense-6f77aca537a291503a873e6c4aa0e4f2dd6128a2.zip
pfsense-6f77aca537a291503a873e6c4aa0e4f2dd6128a2.tar.gz
Properly find gateway ip. The code before did not match for dynamic gateways.
-rw-r--r--etc/inc/gwlb.inc6
-rwxr-xr-xusr/local/www/status_gateways.php2
2 files changed, 5 insertions, 3 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc
index 268d94c..d348e52 100644
--- a/etc/inc/gwlb.inc
+++ b/etc/inc/gwlb.inc
@@ -465,8 +465,10 @@ function dhclient_update_gateway_groups_defaultroute($interface = "wan") {
function lookup_gateway_ip_by_name($name) {
$gateways_arr = return_gateways_array();
- if (!empty($gateways_arr[$name]))
- return $gateways_arr[$name]['gateway'];
+ foreach ($gateways_arr as $gw) {
+ if ($gw['name'] == $name)
+ return $gw['gateway'];
+ }
return false;
}
diff --git a/usr/local/www/status_gateways.php b/usr/local/www/status_gateways.php
index 4d85a42..6d6c43d 100755
--- a/usr/local/www/status_gateways.php
+++ b/usr/local/www/status_gateways.php
@@ -79,7 +79,7 @@ include("head.inc");
?>
<tr>
<td class="listlr">
- <?=strtoupper($gateway['name']);?>
+ <?=$gateway['name'];?>
</td>
<td class="listr" align="center" >
<?php echo lookup_gateway_ip_by_name($gateway['name']);?>
OpenPOWER on IntegriCloud