diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-06-02 21:10:31 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-06-02 21:10:31 +0000 |
commit | d2d602ffa250ac00696fa78c1b63cb47442110a3 (patch) | |
tree | f5870ec7ce54db7150b8731c48fc6e7ab6e6632f /etc/inc/vpn.inc | |
parent | 55b752b4a84edbbd26c3ae1c3130282f39bfd7b1 (diff) | |
download | pfsense-d2d602ffa250ac00696fa78c1b63cb47442110a3.zip pfsense-d2d602ffa250ac00696fa78c1b63cb47442110a3.tar.gz |
* Flush SPD's on reload
* Kilall -HUP racoon if its already running since racoonctl is brokie brokie
Diffstat (limited to 'etc/inc/vpn.inc')
-rw-r--r-- | etc/inc/vpn.inc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc index 81c88d6..19b810b 100644 --- a/etc/inc/vpn.inc +++ b/etc/inc/vpn.inc @@ -247,6 +247,9 @@ function vpn_ipsec_configure($ipchg = false) { fwrite($fd, $spdconf); fclose($fd); + + /* flushie, flushie spds */ + mwexec("/sbin/setkey -FP"); /* load SPD */ mwexec("/sbin/setkey -c < {$g['varetc_path']}/spd.conf"); @@ -560,12 +563,7 @@ EOD; if(is_process_running("racoon")) { /* We are already online, reload */ - mwexec("/usr/local/sbin/racoonctl reload-config"); - sleep(1); - exec("/bin/ps auxw | grep \"racoon\" | awk '{print $2}'", $racoonpid); - if(! empty($racoonpid)) { - mwexec("/usr/bin/kill -HUP $racoonpid[0]"); - } + mwexec("/usr/bin/kill -HUP racoon"); } else { /* sleep for a bit */ sleep (2); |