From 6706a83a06d00d7e0c504139f308b77c3e2c79c0 Mon Sep 17 00:00:00 2001 From: Ermal Date: Mon, 6 Dec 2010 18:16:07 +0000 Subject: Do the setting earlier to not miss any code and make ipsec not work. --- etc/inc/vpn.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc index 7c045d2..e8cc824 100644 --- a/etc/inc/vpn.inc +++ b/etc/inc/vpn.inc @@ -118,6 +118,7 @@ function vpn_ipsec_configure($ipchg = false) return true; } else { mwexec("/sbin/ifconfig enc0 up"); + mwexec("/sbin/sysctl net.inet.ip.ipsec_in_use=1"); if ($g['booting']) echo "Configuring IPsec VPN... "; @@ -877,7 +878,6 @@ EOD; sleep("0.1"); mwexec("/usr/local/sbin/setkey -F", false); sleep("0.1"); - exec("/sbin/sysctl net.inet.ip.ipsec_in_use=1"); /* start racoon */ mwexec("/usr/local/sbin/racoon -f {$g['varetc_path']}/racoon.conf", false); sleep("0.1"); @@ -1721,4 +1721,4 @@ function vpn_ipsec_configure_preferoldsa() { mwexec("/sbin/sysctl net.key.preferred_oldsa=0"); } -?> \ No newline at end of file +?> -- cgit v1.1