summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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