summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2013-02-11 09:42:38 +0000
committerErmal <eri@pfsense.org>2013-02-11 09:42:38 +0000
commitec8b4d8d14d58272bb1f426c0e983ae947791f00 (patch)
treead9da2ddaa1a7f7486c1c6dbde452c8469ced677 /etc
parentd83045b5fab90d0e0ceccadae18d0a5058d0bb85 (diff)
downloadpfsense-ec8b4d8d14d58272bb1f426c0e983ae947791f00.zip
pfsense-ec8b4d8d14d58272bb1f426c0e983ae947791f00.tar.gz
Try to use standard interface to find the source for connecting a tunnel. Also if a ping host is defined for the configuration used that for remoteid since its known to be reachble
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/interfaces.inc7
1 files changed, 4 insertions, 3 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 704d245..14368d3 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -3852,9 +3852,9 @@ function find_ip_interface($ip, $bits = null) {
foreach ($ifdescrs as $ifdescr => $ifname) {
$ifip = ($isv6ip) ? get_interface_ipv6($ifname) : get_interface_ip($ifname);
- if ($ifip === null)
+ if (is_null($ifip))
continue;
- if ($bits === null) {
+ if (is_null($bits)) {
if ($ip == $ifip) {
$int = get_real_interface($ifname);
return $int;
@@ -3867,6 +3867,7 @@ function find_ip_interface($ip, $bits = null) {
}
}
}
+
return false;
}
@@ -3889,7 +3890,7 @@ function find_virtual_ip_alias($ip, $bits = null) {
if ($vip['mode'] === "ipalias") {
if (is_ipaddrv6($vip['subnet']) != $isv6ip)
continue;
- if ($bits === null) {
+ if (is_null($bits)) {
if (ip_in_subnet($ip, $vip['subnet'] . "/" . $vip['subnet_bits'])) {
return $vip;
}
OpenPOWER on IntegriCloud