summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-06-02 21:10:16 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-06-02 21:10:16 +0000
commit4614df6ba3a16a2ee983ba9d8f58f70235a9c168 (patch)
tree5c995dd8bc1477a22b6a11b0a2354f0f396bfccb /etc/inc
parent807e1c0eadb4356293524e5cfbe2c8e10bee2632 (diff)
downloadpfsense-4614df6ba3a16a2ee983ba9d8f58f70235a9c168.zip
pfsense-4614df6ba3a16a2ee983ba9d8f58f70235a9c168.tar.gz
* Flush SPD's on reload * Kilall -HUP racoon if its already running since racoonctl is brokie brokie
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/vpn.inc10
1 files changed, 4 insertions, 6 deletions
diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc
index 9ab60ae..a07b47a 100644
--- a/etc/inc/vpn.inc
+++ b/etc/inc/vpn.inc
@@ -248,6 +248,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);
OpenPOWER on IntegriCloud