diff options
author | Renato Botelho <garga@FreeBSD.org> | 2013-05-22 11:48:37 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2013-05-22 11:48:37 -0300 |
commit | da6aebbb431441f36461b786d09c6b6d21d7d4b7 (patch) | |
tree | db29f1466a09aefe1b222630e3204545a921c61c /etc/inc/vpn.inc | |
parent | 05c82839a12b29f6d850c9f13ee3d0b848170d0e (diff) | |
download | pfsense-da6aebbb431441f36461b786d09c6b6d21d7d4b7.zip pfsense-da6aebbb431441f36461b786d09c6b6d21d7d4b7.tar.gz |
Remove unecessary if
Diffstat (limited to 'etc/inc/vpn.inc')
-rw-r--r-- | etc/inc/vpn.inc | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc index f9b295a..41a5882 100644 --- a/etc/inc/vpn.inc +++ b/etc/inc/vpn.inc @@ -1713,20 +1713,18 @@ function vpn_ipsec_refresh_policies() { continue; if (is_ipaddr($phase1['remote-gateway'])) continue; - if (!is_ipaddr($phase1['remote-gateway'])) { - $dnscache = compare_hostname_to_dnscache($phase1['remote-gateway']); - $dnscache = trim($dnscache); - /* we should have the old IP addresses in the dnscache now */ - if(!empty($dnscache)) { - $oldphase1 = $phase1; - $oldphase1['remote-gateway'] = $dnscache; - /* now we need to find all tunnels for this host */ - if (!is_array($a_phase2) || (!count($a_phase2))) - continue; - foreach ($a_phase2 as $phase2) { - if ($phase2['ikeid'] == $phase1['ikeid']) - reload_tunnel_spd_policy ($phase1, $phase2, $oldphase1, $oldphase2); - } + $dnscache = compare_hostname_to_dnscache($phase1['remote-gateway']); + $dnscache = trim($dnscache); + /* we should have the old IP addresses in the dnscache now */ + if(!empty($dnscache)) { + $oldphase1 = $phase1; + $oldphase1['remote-gateway'] = $dnscache; + /* now we need to find all tunnels for this host */ + if (!is_array($a_phase2) || (!count($a_phase2))) + continue; + foreach ($a_phase2 as $phase2) { + if ($phase2['ikeid'] == $phase1['ikeid']) + reload_tunnel_spd_policy ($phase1, $phase2, $oldphase1, $oldphase2); } } } |