diff options
author | Ermal LUÇI <eri@pfsense.org> | 2015-01-21 21:04:49 +0100 |
---|---|---|
committer | Ermal LUÇI <eri@pfsense.org> | 2015-01-21 21:04:49 +0100 |
commit | 4e1fd3b6f0eded20732f92477c5daef7ab50cfcf (patch) | |
tree | 6e82aa64c4e68e832a2facd430557873ca4cbb8a | |
parent | c7edf1f8e83bd391b9ddfb19fc9f75b5c24fcbb9 (diff) | |
download | pfsense-4e1fd3b6f0eded20732f92477c5daef7ab50cfcf.zip pfsense-4e1fd3b6f0eded20732f92477c5daef7ab50cfcf.tar.gz |
Ticket #4254 Handle even hosts specified throguh dns name
-rw-r--r-- | etc/inc/vpn.inc | 9 |
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]); |