return ${EXIT_ERROR}
fi
+ # Is DPD enabled?
+ local dpd="false"
+ if isset DPD_DELAY && isinteger DPD_DELAY && [ ${DPD_DELAY} -gt 0 ]; then
+ dpd="true"
+ fi
+
print_indent 0 "connections {"
print_indent 1 "${connection} {"
print
# DPD Settings
- if isset DPD_DELAY && isinteger DPD_DELAY && [ ${DPD_DELAY} -gt 0 ]; then
+ if enabled dpd; then
print_indent 2 "# Dead Peer Detection"
-
- print_indent 2 "dpd_action = ${DPD_ACTION}"
print_indent 2 "dpd_delay = ${DPD_DELAY}"
if isset DPD_TIMEOUT; then
print_indent 4 "mark_out = %unique"
print
+ # Dead Peer Detection
+ if enabled dpd; then
+ print_indent 4 "# Dead Peer Detection"
+ print_indent 4 "dpd_action = ${DPD_ACTION}"
+ print
+ fi
+
# Rekeying
if isset LIFETIME; then
print_indent 4 "# Rekey Time"