diff options
Diffstat (limited to 'etc/inc/vpn.inc')
-rw-r--r-- | etc/inc/vpn.inc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc index 3d8ff50..03de93c 100644 --- a/etc/inc/vpn.inc +++ b/etc/inc/vpn.inc @@ -172,12 +172,16 @@ function vpn_ipsec_configure($ipchg = false) { vpn_localnet_determine($tunnel['local-subnet'], $sa, $sn); + if(is_domain($tunnel['remote-gateway'])) { + $tmp = gethostbyname($tunnel['remote-gateway']); + if($tmp) + $tunnel['remote-gateway'] = $tmp; + } + if(isset($tunnel['creategif'])) { $number_of_gifs = find_last_gif_device(); $number_of_gifs++; $curwanip = get_current_wan_address(); - if(is_domain($tunnel['remote-gateway'])) - $tunnel['remote-gateway'] = gethostbyname($tunnel['remote-gateway']); if($config['installedpackages']['sasyncd']['config'] <> "") foreach($config['installedpackages']['sasyncd']['config'] as $sasyncd) { if($sasyncd['ip'] <> "") |