mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Make 3 passes at loading the SPD entries as this will fail on large configurations > 250 tunnels
Tested by smos@ 399 tunnels 239 active, ok by sullrich@
This commit is contained in:
parent
0aeab9f19f
commit
abd9c0367f
@ -568,26 +568,29 @@ EOD;
|
||||
chmod("{$g['varetc_path']}/psk.txt", 0600);
|
||||
|
||||
if(is_process_running("racoon")) {
|
||||
/* flush SPD entries */
|
||||
mwexec("/sbin/setkey -FP");
|
||||
// mwexec("/sbin/setkey -F");
|
||||
$i = 0;
|
||||
while($i < 2) {
|
||||
/* load SPD */
|
||||
mwexec("/bin/cat {$g['varetc_path']}/spd.conf | /usr/local/bin/slowdownpipe.sh | /sbin/setkey -c");
|
||||
$i++;
|
||||
}
|
||||
/* We are already online, reload */
|
||||
mwexec("/usr/bin/killall -HUP racoon");
|
||||
// sleep(2);
|
||||
/* flushie, flushie spds */
|
||||
} else {
|
||||
/* flush SA + SPD entries */
|
||||
mwexec("/sbin/setkey -FP");
|
||||
mwexec("/sbin/setkey -F");
|
||||
/* load SPD */
|
||||
mwexec("/bin/cat {$g['varetc_path']}/spd.conf | /usr/local/bin/slowdownpipe.sh | /sbin/setkey -c");
|
||||
sleep(1);
|
||||
} else {
|
||||
$i = 0;
|
||||
while($i < 2) {
|
||||
/* load SPD */
|
||||
mwexec("/bin/cat {$g['varetc_path']}/spd.conf | /usr/local/bin/slowdownpipe.sh | /sbin/setkey -c");
|
||||
$i++;
|
||||
}
|
||||
/* start racoon */
|
||||
mwexec("/usr/local/sbin/racoon -f {$g['varetc_path']}/racoon.conf");
|
||||
/* sleep for a bit */
|
||||
// sleep (2);
|
||||
/* flushie, flushie spds */
|
||||
mwexec("/sbin/setkey -FP");
|
||||
mwexec("/sbin/setkey -F");
|
||||
/* load SPD */
|
||||
mwexec("/bin/cat {$g['varetc_path']}/spd.conf | /usr/local/bin/slowdownpipe.sh | /sbin/setkey -c");
|
||||
sleep(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user