summaryrefslogtreecommitdiffstats
path: root/src/etc/inc
diff options
context:
space:
mode:
Diffstat (limited to 'src/etc/inc')
-rw-r--r--src/etc/inc/vpn.inc10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/etc/inc/vpn.inc b/src/etc/inc/vpn.inc
index 1f2372a..6390aed 100644
--- a/src/etc/inc/vpn.inc
+++ b/src/etc/inc/vpn.inc
@@ -1109,11 +1109,13 @@ EOD;
$reauth = "reauth = yes";
}
- if ($ph1ent['margintime']) {
- $rekeyline = "rekey = yes";
- $rekeyline .= "\n\tmargintime = {$ph1ent['margintime']}s";
- } else {
+ if (isset($ph1ent['rekey_enable'])) {
$rekeyline = "rekey = no";
+ } else {
+ $rekeyline = "rekey = yes";
+ if(!empty($ph1ent['margintime'])){
+ $rekeyline .= "\n\tmargintime = {$ph1ent['margintime']}s";
+ }
}
if ($ph1ent['nat_traversal'] == 'off') {
OpenPOWER on IntegriCloud