summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2008-11-30 09:27:41 +0000
committerErmal Luçi <eri@pfsense.org>2008-11-30 09:27:41 +0000
commit01383bd50fce2f34638ab0514a91e8af6f2fac3b (patch)
tree3eb96ccb87489c6a0df2ae04668d538723144829 /etc/inc
parente34ecb2056d774646c4531694923f97669cf150e (diff)
downloadpfsense-01383bd50fce2f34638ab0514a91e8af6f2fac3b.zip
pfsense-01383bd50fce2f34638ab0514a91e8af6f2fac3b.tar.gz
Cosmetic change to use the available function instead of replicating the process here.
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/pfsense-utils.inc15
1 files changed, 4 insertions, 11 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 7e1b0f8..896ad06 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -3413,15 +3413,8 @@ function get_interface_gateway($interface) {
$gwcfg = $config['interfaces'][$interface];
if (is_ipaddr($gwcfg['gateway']))
$gw = $gwcfg['gateway'];
- else if ($gwcfg['gateway'] <> "") {
- if (is_array($config['gateways']['gateway_item']))
- foreach($config['gateways']['gateway_item'] as $gateway) {
- if($gateway['name'] == $gwcfg['gateway']) {
- $gw = $gateway['gateway'];
- break;
- }
- }
- }
+ else if (!empty($gwcfg['gateway']))
+ $gw = lookup_gateway_ip_by_name($gwcfg['gateway']);
// for dynamic interfaces we handle them through the $interface_router file.
if (!is_ipaddr($gw)) {
@@ -3789,7 +3782,7 @@ function lookup_gateway_ip_by_name($name) {
foreach($config['gateways']['gateway_item'] as $gateway) {
if($gateway['name'] == $name) {
$gatewayip = $gateway['gateway'];
- $interfacegw = $gateway['interface'];
+ //$interfacegw = $gateway['interface'];
return($gatewayip);
}
}
@@ -3999,4 +3992,4 @@ function read_body($ch, $string) {
return $length;
}
-?> \ No newline at end of file
+?>
OpenPOWER on IntegriCloud