summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2014-11-12 20:40:19 (GMT)
committerErmal <eri@pfsense.org>2014-11-12 20:41:52 (GMT)
commitc9b70c0a675587ee57eec93d41b729288e8fb773 (patch)
treef63d3af375ce9025e288bd7e519f745f3caaf866
parent38d2141421ce6360e7f0fbe5ec0d2640687caa45 (diff)
downloadunivnautes-c9b70c0a675587ee57eec93d41b729288e8fb773.zip
univnautes-c9b70c0a675587ee57eec93d41b729288e8fb773.tar.gz
univnautes-c9b70c0a675587ee57eec93d41b729288e8fb773.tar.bz2
Remove redundant code and check for dpd_enable checkbox to be set
-rw-r--r--etc/inc/vpn.inc5
1 files changed, 2 insertions, 3 deletions
diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc
index 8d71486..0fbecd2 100644
--- a/etc/inc/vpn.inc
+++ b/etc/inc/vpn.inc
@@ -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