summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-07-22 15:34:57 +0000
committerErmal <eri@pfsense.org>2010-07-22 15:34:57 +0000
commit98c02cac641448d9f54084641ba9756ec96625c6 (patch)
tree18e3be186114203a5d56a8c5045a0d915425708b
parentaa115b2f3e08730d4a458e83b9f3aa47ef64698f (diff)
downloadpfsense-98c02cac641448d9f54084641ba9756ec96625c6.zip
pfsense-98c02cac641448d9f54084641ba9756ec96625c6.tar.gz
Ticket #655. Another try at this.
-rw-r--r--etc/inc/vpn.inc12
1 files changed, 6 insertions, 6 deletions
diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc
index 121d700..68e1064 100644
--- a/etc/inc/vpn.inc
+++ b/etc/inc/vpn.inc
@@ -103,21 +103,21 @@ function vpn_ipsec_configure($ipchg = false)
if (!isset($ipseccfg['enable'])) {
mwexec("/sbin/ifconfig enc0 down");
+ /* send a SIGKILL to be sure */
+ sigkillbypid("{$g['varrun_path']}/racoon.pid", "KILL");
+
/* kill racoon */
if(is_process_running("racoon"))
mwexec("/usr/bin/killall racoon", true);
killbypid("{$g['varrun_path']}/dnswatch-ipsec.pid");
-
+
/* wait for racoon process to die */
sleep(2);
- /* send a SIGKILL to be sure */
- sigkillbypid("{$g['varrun_path']}/racoon.pid", "KILL");
-
/* flush SPD and SAD */
- mwexec("/usr/local/sbin/setkey -FP");
mwexec("/usr/local/sbin/setkey -F");
-
+ mwexec("/usr/local/sbin/setkey -FP");
+
/* disallow IPSEC, it is off */
// exec("/sbin/sysctl net.inet.ip.ipsec_in_use=0");
OpenPOWER on IntegriCloud