summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal LUÇI <eri@pfsense.org>2015-01-21 21:04:49 +0100
committerErmal LUÇI <eri@pfsense.org>2015-01-21 21:04:49 +0100
commit4e1fd3b6f0eded20732f92477c5daef7ab50cfcf (patch)
tree6e82aa64c4e68e832a2facd430557873ca4cbb8a
parentc7edf1f8e83bd391b9ddfb19fc9f75b5c24fcbb9 (diff)
downloadpfsense-4e1fd3b6f0eded20732f92477c5daef7ab50cfcf.zip
pfsense-4e1fd3b6f0eded20732f92477c5daef7ab50cfcf.tar.gz
Ticket #4254 Handle even hosts specified throguh dns name
-rw-r--r--etc/inc/vpn.inc9
1 files changed, 7 insertions, 2 deletions
diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc
index 9ca8277..82e95d1 100644
--- a/etc/inc/vpn.inc
+++ b/etc/inc/vpn.inc
@@ -583,7 +583,12 @@ EOD;
$passive = 'add';
} else {
$right_spec = $ph1ent['remote-gateway'];
- if (is_ipaddrv4($right_spec)) {
+ if (is_ipaddr($right_spec))
+ $sourcehost = $right_spec;
+ else
+ $sourcehost = $rgmap['remote-gateway'];
+
+ if (is_ipaddrv4($sourcehost)) {
if (strpos($ph1ent['interface'], '_vip')) {
$vpninterface = explode('_vip', $ph1ent['interface']);
$ifacesuse = get_real_interface($vpninterface[0]);
@@ -604,7 +609,7 @@ EOD;
}
}
}
- } else if (is_ipaddrv6($right_spec)) {
+ } else if (is_ipaddrv6($sourcehost)) {
if (strpos($ph1ent['interface'], '_vip')) {
$vpninterface = explode('_vip', $ph1ent['interface']);
$ifacesuse = get_real_interface($vpninterface[0]);
OpenPOWER on IntegriCloud