mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 16:44:39 +00:00
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:
parent
4edbacc519
commit
dd02e21231
@ -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'])) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user