IPsec: Try to restart always-on tunnels immediately

When a tunnel that is in always-on configuration closes
unexpectedly, we can instruct strongSwan to restart it
immediately which is precisely what we do now.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2018-02-19 23:42:17 +00:00
parent 2ec7a53b3e
commit a261cb06c6
3 changed files with 15 additions and 2 deletions

View File

@@ -436,6 +436,12 @@ sub writeipsecfiles {
if ($start_action eq 'route' && $inactivity_timeout > 0) {
print CONF "\tinactivity=$inactivity_timeout\n";
}
# Restart the connection immediately when it has gone down
# unexpectedly
if ($start_action eq 'start') {
print CONF "\tcloseaction=restart\n";
}
}
# Fragmentation