IPsec, change dpd action on "start" to "dpdaction = restart" and remove already default "dpdaction = none" if not set. as discussed with @mimugmail

This commit is contained in:
Ad Schellevis 2019-07-16 16:55:03 +02:00
parent 4edbacc519
commit dd02e21231

View File

@ -1197,7 +1197,7 @@ function ipsec_configure_do($verbose = false, $interface = '')
}
if (!empty($ph1ent['dpd_delay']) && !empty($ph1ent['dpd_maxfail'])) {
if ($conn_auto == "route") {
if (in_array($conn_auto, array('route', 'start'))) {
$dpdline = "dpdaction = restart";
} else {
$dpdline = "dpdaction = clear";
@ -1205,8 +1205,6 @@ function ipsec_configure_do($verbose = false, $interface = '')
$dpdline .= "\n\tdpddelay = {$ph1ent['dpd_delay']}s";
$dpdtimeout = $ph1ent['dpd_delay'] * ($ph1ent['dpd_maxfail'] + 1);
$dpdline .= "\n\tdpdtimeout = {$dpdtimeout}s";
} else {
$dpdline = "dpdaction = none";
}
if (!empty($ph1ent['lifetime'])) {