mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Fix logic to prevent rule errors when dyndns hostnames do not resolve.
Previous Logic did not work
This commit is contained in:
parent
c806f1bbc8
commit
e07ff7c0a5
@ -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) {
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user