diff options
author | Ermal <eri@pfsense.org> | 2010-06-18 21:15:46 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2010-06-18 21:15:46 +0000 |
commit | 6f77aca537a291503a873e6c4aa0e4f2dd6128a2 (patch) | |
tree | fd8806c0c752eadda12a348576f49f4b6635b76c | |
parent | 3a9eb3c90848a78bbd5ae2c6285343e338bc6bb3 (diff) | |
download | pfsense-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.inc | 6 | ||||
-rwxr-xr-x | usr/local/www/status_gateways.php | 2 |
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']);?> |