bug fix: Honour newer sa setting

This commit is contained in:
Scott Ullrich 2004-11-19 23:05:52 +00:00
parent a615fd33ac
commit 1b2808f1f8

View File

@ -51,8 +51,9 @@ function vpn_ipsec_configure($ipchg = false) {
global $config, $g;
if(isset($config['ipsec']['preferredoldsa'])) {
// Set sysctl -w net.key.preferred_oldsa=0
mwexec("sysctl -w net.key.preferred_oldsa=0");
mwexec("/sbin/sysctl net.key.preferred_oldsa=0");
} else {
mwexec("/sbin/sysctl -w net.key.preferred_oldsa=-30");
}
$number_of_gifs = find_last_gif_device();
@ -89,9 +90,6 @@ function vpn_ipsec_configure($ipchg = false) {
mwexec("/usr/sbin/setkey -FP");
mwexec("/usr/sbin/setkey -F");
/* prefer old SAs only for 30 seconds, then use the new one */
mwexec("/sbin/sysctl -w net.key.preferred_oldsa=-30");
if (isset($ipseccfg['enable'])) {
if (!$curwanip) {