summaryrefslogtreecommitdiff
path: root/scripts/vpn-config.pl
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/vpn-config.pl')
-rwxr-xr-xscripts/vpn-config.pl5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/vpn-config.pl b/scripts/vpn-config.pl
index 7c7f976..0369f76 100755
--- a/scripts/vpn-config.pl
+++ b/scripts/vpn-config.pl
@@ -798,8 +798,6 @@ if ( $vcVPN->exists('ipsec') ) {
}
}
- ## explicitly set keyingtries to forever ##
- $genout .= "\tkeyingtries=%forever\n";
#
# Write ESP configuration from group
@@ -1053,13 +1051,16 @@ if ( $vcVPN->exists('ipsec') ) {
#
if ($any_peer) {
$genout .= "\tauto=add\n";
+ $genout .= "\tkeyingtries=%forever\n";
} else {
my $conntype = $vcVPN->returnValue("ipsec site-to-site peer $peer connection-type");
if (defined ($conntype)){
if ($conntype eq "initiate"){
$genout .= "\tauto=start\n";
+ $genout .= "\tkeyingtries=%forever\n";
} elsif ($conntype eq "respond"){
$genout .= "\tauto=add\n";
+ $genout .= "\tkeyingtries=1\n";
}
}
else{