Remove redundant code and check for dpd_enable checkbox to be set

This commit is contained in:
Ermal 2014-11-12 21:40:19 +01:00
parent 38d2141421
commit c9b70c0a67
1 changed files with 2 additions and 3 deletions

View File

@ -537,8 +537,7 @@ EOD;
if (!empty($ph1ent['iketype']) && $ph1ent['iketype'] != "ikev1") {
$keyexchange = "ikev2";
//$passive = "start";
} else
$passive = "route";
}
if (isset($ph1ent['mobile'])) {
$right_spec = "%any";
@ -570,7 +569,7 @@ EOD;
$ealgosp1 .= "!";
}
if ($ph1ent['dpd_delay'] && $ph1ent['dpd_maxfail']) {
if (isset($ph1ent['dpd_enable']) && $ph1ent['dpd_delay'] && $ph1ent['dpd_maxfail']) {
if ($passive == "route")
$dpdline = "dpdaction = restart";
else