diff options
author | Seth Mos <seth.mos@dds.nl> | 2010-10-23 12:49:19 +0200 |
---|---|---|
committer | Seth Mos <seth.mos@dds.nl> | 2010-10-23 12:49:19 +0200 |
commit | 640b3a9ac1d40dd9a0b5354c848045f5cb301fd3 (patch) | |
tree | e92f022382f0860a692b08911026c93ace99082e /etc/inc/gwlb.inc | |
parent | 66e0ff494c2892058c8903dde7ba43d810c8aa41 (diff) | |
download | pfsense-640b3a9ac1d40dd9a0b5354c848045f5cb301fd3.zip pfsense-640b3a9ac1d40dd9a0b5354c848045f5cb301fd3.tar.gz |
remove some debugging from filter inc, show correct ipv6 gateway from function
Diffstat (limited to 'etc/inc/gwlb.inc')
-rw-r--r-- | etc/inc/gwlb.inc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc index d8bd05a..3d1ec93 100644 --- a/etc/inc/gwlb.inc +++ b/etc/inc/gwlb.inc @@ -147,7 +147,12 @@ EOD; } /* Interface ip is needed since apinger will bind a socket to it. */ - $gwifip = find_interface_ip($gateway['interface'], true); + if (is_ipaddrv4($gateway['gateway'])) { + $gwifip = find_interface_ip($gateway['interface'], true); + } + if (is_ipaddrv6($gateway['gateway'])) { + $gwifip = find_interface_ipv6($gateway['interface'], true); + } if (!is_ipaddr($gwifip)) continue; //Skip this target @@ -535,11 +540,10 @@ function get_interface_gateway_v6($interface, &$dynamic = false) { global $config, $g; $gw = NULL; - $gwcfg = $config['interfaces'][$interface]; if (!empty($gwcfg['gateway']) && is_array($config['gateways']['gateway_item'])) { foreach($config['gateways']['gateway_item'] as $gateway) { - if(($gateway['name'] == $gwcfg['gateway']) && (is_ipaddrv6($gateway['gateway']))) { + if(($gateway['name'] == $gwcfg['gatewayv6']) && (is_ipaddrv6($gateway['gateway']))) { $gw = $gateway['gateway']; break; } |