diff options
author | Seth Mos <seth.mos@xs4all.nl> | 2008-01-15 11:35:04 +0000 |
---|---|---|
committer | Seth Mos <seth.mos@xs4all.nl> | 2008-01-15 11:35:04 +0000 |
commit | d319d7d83f4c9c717208866789cec45b9bfc2d3f (patch) | |
tree | 06504b66cf164bd9bfe37c1b1273691a7d21e032 /etc/inc | |
parent | cdf779cdd73e1f6d8fac4e7b32f6c79e1fd68208 (diff) | |
download | pfsense-d319d7d83f4c9c717208866789cec45b9bfc2d3f.zip pfsense-d319d7d83f4c9c717208866789cec45b9bfc2d3f.tar.gz |
Somehow sending a SIGHUP before flushing and reloading works better then
after. Technically a SIGHUP to racoon should not do anything.
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/vpn.inc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc index 923e632..8c8c2d8 100644 --- a/etc/inc/vpn.inc +++ b/etc/inc/vpn.inc @@ -608,6 +608,8 @@ EOD; if(is_process_running("racoon")) { + /* We are already online, reload */ + mwexec("/usr/bin/killall -HUP racoon"); /* flush SPD entries */ mwexec("/sbin/setkey -FP"); mwexec("/sbin/setkey -F"); @@ -615,11 +617,12 @@ EOD; while($i < 2) { /* load SPD */ mwexec("/bin/cat {$g['varetc_path']}/spd.conf | /usr/local/bin/slowdownpipe.sh | /sbin/setkey -c"); + sleep(2); $i++; } - /* We are already online, reload */ - mwexec("/usr/bin/killall -HUP racoon"); } else { + /* start racoon */ + mwexec("/usr/local/sbin/racoon -f {$g['varetc_path']}/racoon.conf"); /* flush SA + SPD entries*/ mwexec("/sbin/setkey -FP"); mwexec("/sbin/setkey -F"); @@ -627,10 +630,9 @@ EOD; while($i < 2) { /* load SPD */ mwexec("/bin/cat {$g['varetc_path']}/spd.conf | /usr/local/bin/slowdownpipe.sh | /sbin/setkey -c"); + sleep(2); $i++; } - /* start racoon */ - mwexec("/usr/local/sbin/racoon -f {$g['varetc_path']}/racoon.conf"); /* start dnswatch, if necessary */ if (count($dnswatch_list) > 0) { |