diff options
author | Seth Mos <seth.mos@xs4all.nl> | 2009-03-12 20:00:26 +0100 |
---|---|---|
committer | Seth Mos <seth.mos@xs4all.nl> | 2009-03-12 20:00:26 +0100 |
commit | 8d53456560921123fdab837861e1dd68c4836d2d (patch) | |
tree | 8a3311a8298fd15d1f15f5aff7e3e3a44cbec142 /etc | |
parent | e92fb875e974a1e1a65f909b9987daa494367459 (diff) | |
download | pfsense-8d53456560921123fdab837861e1dd68c4836d2d.zip pfsense-8d53456560921123fdab837861e1dd68c4836d2d.tar.gz |
Actually remove the spd reload files after processing it. This would break the tunnels as it would re-process all files in order every time the configuration reloads a
tunnel.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/vpn.inc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc index aa0857f..30fdefb 100644 --- a/etc/inc/vpn.inc +++ b/etc/inc/vpn.inc @@ -1498,17 +1498,17 @@ function vpn_ipsec_refresh_policies() { $tmpfiles = array(); $dh = opendir($g['tmp_path']); while (false !== ($filename = readdir($dh))) { - $tmpfiles[] = $filename; + if(preg_match("/^spd.conf.reload./", $tmpfile)) { + $tmpfiles[] = $filename; + } } sort($tmpfiles); foreach($tmpfiles as $tmpfile) { - if(preg_match("/^spd.conf.reload./", $tmpfile)) { - $ret = mwexec("/usr/local/sbin/setkey -f {$g['tmp_path']}/{$tmpfile} 2>&1", false); - if($ret == 0) { - // unlink_if_exists("{$g['tmp_path']}/{$tmpfile}"); - } else { - rename("{$g['tmp_path']}/{$tmpfile}", ("{$g['tmp_path']}/failed.{$tmpfile}")); - } + $ret = mwexec("/usr/local/sbin/setkey -f {$g['tmp_path']}/{$tmpfile} 2>&1", false); + if($ret == 0) { + unlink_if_exists("{$g['tmp_path']}/{$tmpfile}"); + } else { + rename("{$g['tmp_path']}/{$tmpfile}", ("{$g['tmp_path']}/failed.{$tmpfile}")); } } } |