summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorSeth Mos <seth.mos@xs4all.nl>2009-01-15 08:37:35 +0000
committerSeth Mos <seth.mos@xs4all.nl>2009-01-15 08:37:35 +0000
commite07ff7c0a5872668da5a65d9c2b1cdedd64cb56d (patch)
tree2e269a5bcbb6379750e76910eb4e3e1879928a4c /etc
parentc806f1bbc83c25966808598a75c0e2ae03707dd5 (diff)
downloadpfsense-e07ff7c0a5872668da5a65d9c2b1cdedd64cb56d.zip
pfsense-e07ff7c0a5872668da5a65d9c2b1cdedd64cb56d.tar.gz
Fix logic to prevent rule errors when dyndns hostnames do not resolve.
Previous Logic did not work
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/filter.inc10
1 files changed, 6 insertions, 4 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index f7bbc01..1fc59e4 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -2779,11 +2779,13 @@ EOD;
/* if tunnel is disabled, lets skip to next item */
$ipsec_ips = array(get_current_wan_address($tunnel['interface']));
/* is this a dynamic dns hostname? */
- $remote_gateway = gethostbyname($tunnel['remote-gateway']);
- if($remote_gateway == "")
+ if(!is_ipaddr($tunnel['remote-gateway'])) {
+ $remote_gateway = resolve_retry($tunnel['remote-gateway']);
+ } else {
$remote_gateway = $tunnel['remote-gateway'];
+ }
/* do not add items with blank remote_gateway */
- if(!$remote_gateway) {
+ if(!is_ipaddr($remote_gateway)) {
$ipfrules .= "# ERROR! Remote gateway not found on {$tunnel['remote-gateway']}\n";
continue;
}
@@ -3293,4 +3295,4 @@ function return_vpn_subnet($adr) {
}
-?> \ No newline at end of file
+?>
OpenPOWER on IntegriCloud