diff options
| author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2026-05-26 17:47:15 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-26 17:47:15 +0300 |
| commit | f333e72b999c296565fc23e79b3bf651dc85afb0 (patch) | |
| tree | 9af1e5784a514c83b66abd36acfb24d53ca8537b /data | |
| parent | 4574af601e2642f1b0437763195d94b9a4486b8b (diff) | |
| parent | b6d24956bd4c7a5e4cb89c0b4331264a96667184 (diff) | |
| download | vyos-1x-f333e72b999c296565fc23e79b3bf651dc85afb0.tar.gz vyos-1x-f333e72b999c296565fc23e79b3bf651dc85afb0.zip | |
Merge pull request #5197 from alexandr-san4ez/T7555-current
ipsec: T7555: Implement `ikev2-reauth` for site-to-site peers
Diffstat (limited to 'data')
| -rw-r--r-- | data/templates/ipsec/swanctl/peer.j2 | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/data/templates/ipsec/swanctl/peer.j2 b/data/templates/ipsec/swanctl/peer.j2 index 24d037fe1..96f761cce 100644 --- a/data/templates/ipsec/swanctl/peer.j2 +++ b/data/templates/ipsec/swanctl/peer.j2 @@ -3,6 +3,13 @@ {# peer needs to reference the global IKE configuration for certain values #} {% set ike = ike_group[peer_conf.ike_group] %} {{ name }} { +{# Resolve effective reauth setting: peer overrides ike-group #} +{% set reauth = peer_conf.ikev2_reauth if peer_conf.ikev2_reauth is vyos_defined else '' %} +{% if reauth == 'inherit' %} +{% set reauth = ike.ikev2_reauth is vyos_defined %} +{% else %} +{% set reauth = reauth == 'yes' %} +{% endif %} {% if peer_conf.authentication.ppk.id is vyos_defined %} ppk_id = {{ peer_conf.authentication.ppk.id }} {% endif %} @@ -36,6 +43,9 @@ reauth_time = 0 {% elif peer_conf.connection_type is not vyos_defined or peer_conf.connection_type is vyos_defined('initiate') %} keyingtries = 0 +{% if reauth and ike.key_exchange is vyos_defined('ikev2') %} + reauth_time = {{ ike.lifetime }}s +{% endif %} {% elif peer_conf.connection_type is vyos_defined('trap') %} keyingtries = 1 {% endif %} |
