From 8ee9b271e7defb98616167b6063dafdb4648a58d Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Fri, 12 Aug 2005 15:09:13 +0000 Subject: Check to see if item is dynamic dns a little better --- etc/inc/vpn.inc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'etc/inc/vpn.inc') 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'] <> "") -- cgit v1.1