summaryrefslogtreecommitdiff
path: root/data/templates/ipsec/swanctl/profile.tmpl
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-07-03 15:39:17 +0200
committerChristian Poessinger <christian@poessinger.com>2021-07-03 15:39:17 +0200
commit1e74c0df2179c60036e440e15ed9036163039b2a (patch)
tree4352ed737a931a3d6fbbfb6ecd99cfb84f34661f /data/templates/ipsec/swanctl/profile.tmpl
parenta1abb118c9eb413f3c78cfb2077f9c0d4b443c3a (diff)
downloadvyos-1x-1e74c0df2179c60036e440e15ed9036163039b2a.tar.gz
vyos-1x-1e74c0df2179c60036e440e15ed9036163039b2a.zip
ipsec: T2816: remove default values from Jinja2 template and place them in XML
VyOS has a known to work mechanism in supplying CLI default values into the Python configuration scripts. This commit removes hardcoded default values from the Jinja2 template and places them into the appropriate XML definitions. The big advantage is that the default value itself and the corresponding help string are located in the exact same file.
Diffstat (limited to 'data/templates/ipsec/swanctl/profile.tmpl')
-rw-r--r--data/templates/ipsec/swanctl/profile.tmpl6
1 files changed, 3 insertions, 3 deletions
diff --git a/data/templates/ipsec/swanctl/profile.tmpl b/data/templates/ipsec/swanctl/profile.tmpl
index 0360972f6..0a7268405 100644
--- a/data/templates/ipsec/swanctl/profile.tmpl
+++ b/data/templates/ipsec/swanctl/profile.tmpl
@@ -7,7 +7,7 @@
dmvpn-{{ name }}-{{ interface }} {
proposals = {{ ike_group[profile_conf.ike_group] | get_esp_ike_cipher | join(',') }}
version = {{ ike.key_exchange[4:] if ike is defined and ike.key_exchange is defined else "0" }}
- rekey_time = {{ ike.lifetime if ike.lifetime is defined else '28800' }}s
+ rekey_time = {{ ike.lifetime }}s
keyingtries = 0
{% if profile_conf.authentication is defined and profile_conf.authentication.mode is defined and profile_conf.authentication.mode == 'pre-shared-secret' %}
local {
@@ -20,11 +20,11 @@
children {
dmvpn {
esp_proposals = {{ esp | get_esp_ike_cipher | join(',') }}
- rekey_time = {{ esp.lifetime if esp.lifetime is defined else '3600' }}s
+ rekey_time = {{ esp.lifetime }}s
rand_time = 540s
local_ts = dynamic[gre]
remote_ts = dynamic[gre]
- mode = {{ esp.mode if esp.mode is defined else 'transport' }}
+ mode = {{ esp.mode }}
{% if ike.dead_peer_detection is defined and ike.dead_peer_detection.action is defined %}
dpd_action = {{ ike.dead_peer_detection.action }}
{% endif %}