summaryrefslogtreecommitdiffstats
path: root/etc/inc/gwlb.inc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-05-21 20:50:56 +0000
committerErmal <eri@pfsense.org>2010-05-21 20:50:56 +0000
commit61d54be64ae4f9b181c57d8b6f3cfe7de9b881e6 (patch)
tree1aac07ac9c826a95d93a3a6b405c6445d92b9571 /etc/inc/gwlb.inc
parent962625aa412ad9dc9b18aeefd1db77eac9e14e7b (diff)
downloadpfsense-61d54be64ae4f9b181c57d8b6f3cfe7de9b881e6.zip
pfsense-61d54be64ae4f9b181c57d8b6f3cfe7de9b881e6.tar.gz
Actually return to previous function code for lookup_gateway_ip_by_name() to not create recursive loops. There is still the question of how dynamic interfaces should be handled here?
Diffstat (limited to 'etc/inc/gwlb.inc')
-rw-r--r--etc/inc/gwlb.inc10
1 files changed, 5 insertions, 5 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc
index 80cfc40..4c6c946 100644
--- a/etc/inc/gwlb.inc
+++ b/etc/inc/gwlb.inc
@@ -477,11 +477,11 @@ function dhclient_update_gateway_groups_defaultroute($interface = "wan") {
function lookup_gateway_ip_by_name($name) {
global $config;
- $gateways_arr = return_gateways_array();
- if (!empty($gateways_arr[$name])) {
- $gatewayip = $gateway['gateway'];
- //$interfacegw = $gateway['interface'];
- return ($gatewayip);
+ if(is_array($config['gateways']['gateway_item'])) {
+ foreach($config['gateways']['gateway_item'] as $gateway) {
+ if($gateway['name'] == $name) {
+ return ($gateway['gateway']);
+ }
} else
return (false);
}
OpenPOWER on IntegriCloud