summaryrefslogtreecommitdiffstats
path: root/etc/inc/gwlb.inc
diff options
context:
space:
mode:
authorRenato Botelho <renato.botelho@bluepex.com>2010-10-01 09:56:10 -0300
committerRenato Botelho <renato.botelho@bluepex.com>2010-10-01 09:56:10 -0300
commit788c1288bae791ac0b3f2a19eb8c6aac8d7a7c22 (patch)
tree2203239bcbed0d9409ea9c5c179180c7667964a3 /etc/inc/gwlb.inc
parent43652f2fecfeb7ed4de28d697d515197ff1e3100 (diff)
parent80a5b5f7e61dc8ed1a7928149506650956b8bb86 (diff)
downloadpfsense-788c1288bae791ac0b3f2a19eb8c6aac8d7a7c22.zip
pfsense-788c1288bae791ac0b3f2a19eb8c6aac8d7a7c22.tar.gz
Merge remote branch 'mainline/master' into inc
Conflicts: etc/inc/filter.inc etc/inc/system.inc
Diffstat (limited to 'etc/inc/gwlb.inc')
-rw-r--r--etc/inc/gwlb.inc12
1 files changed, 3 insertions, 9 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc
index 02d8711..03cbf6f 100644
--- a/etc/inc/gwlb.inc
+++ b/etc/inc/gwlb.inc
@@ -339,11 +339,7 @@ function return_gateways_array($disabled = false) {
}
}
- /* retrieve a proper monitor IP? */
- $ifcfg =& $config['interfaces'][$ifname];
- if (is_ipaddr($ifcfg['monitorip']))
- $gateway['monitor'] = $ifcfg['monitorip'];
- else
+ if (is_ipaddr($gateway['gateway']))
$gateway['monitor'] = $gateway['gateway'];
$gateway['descr'] = "Interface {$friendly} Dynamic Gateway";
@@ -478,7 +474,7 @@ function lookup_gateway_monitor_ip_by_name($name) {
if(!is_ipaddr($gateway['monitor']))
return $gateway['gateway'];
- return ($monitorip);
+ return $gateway['monitor'];
}
return (false);
@@ -501,9 +497,7 @@ function get_interface_gateway($interface, &$dynamic = false) {
$gw = NULL;
$gwcfg =& $config['interfaces'][$interface];
- if (is_ipaddr($gwcfg['gateway']))
- $gw = $gwcfg['gateway'];
- else if (!empty($gwcfg['gateway']) && is_array($config['gateways']['gateway_item'])) {
+ if (!empty($gwcfg['gateway']) && is_array($config['gateways']['gateway_item'])) {
foreach($config['gateways']['gateway_item'] as $gateway) {
if ($gateway['name'] == $gwcfg['gateway']) {
$gw = $gateway['gateway'];
OpenPOWER on IntegriCloud