diff options
author | Seth Mos <seth.mos@xs4all.nl> | 2008-01-15 11:36:24 +0000 |
---|---|---|
committer | Seth Mos <seth.mos@xs4all.nl> | 2008-01-15 11:36:24 +0000 |
commit | 989f0b0827e72b67d9a920e69b16e7212cf3204a (patch) | |
tree | 3ad67feaa779b11c64670d0828c0de464cd38e5f /etc | |
parent | 81cf1a89f3b06453b3e3c1afee6bdb446764cc06 (diff) | |
download | pfsense-989f0b0827e72b67d9a920e69b16e7212cf3204a.zip pfsense-989f0b0827e72b67d9a920e69b16e7212cf3204a.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')
-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 fc404b7..af0c433 100644 --- a/etc/inc/vpn.inc +++ b/etc/inc/vpn.inc @@ -568,6 +568,8 @@ EOD; chmod("{$g['varetc_path']}/psk.txt", 0600); 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"); @@ -575,11 +577,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"); @@ -587,10 +590,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"); } } } |