summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2026-06-25 16:36:22 +0200
committerGitHub <noreply@github.com>2026-06-25 16:36:22 +0200
commitfe78ab4165456fd1d7bcd2ec99d7601dc2e71d2c (patch)
tree474df907283a78040dea704765f10b3b84eb6b0a /python
parent53cfae0cbd315f5e8e4b8288c1f2382bd6212e87 (diff)
parent11d5ee39fa41f512e343ef6084675a0f372c9e92 (diff)
downloadvyos-1x-fe78ab4165456fd1d7bcd2ec99d7601dc2e71d2c.tar.gz
vyos-1x-fe78ab4165456fd1d7bcd2ec99d7601dc2e71d2c.zip
Merge pull request #5284 from vyos/T8097-strongswan-esn
T8097: strongswan: add CLI for ESN
Diffstat (limited to 'python')
-rwxr-xr-xpython/vyos/template.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/python/vyos/template.py b/python/vyos/template.py
index 01c60a8b3..c1555aa1c 100755
--- a/python/vyos/template.py
+++ b/python/vyos/template.py
@@ -530,6 +530,17 @@ def get_esp_ike_cipher(group_config, ike_group=None):
group = get_first_ike_dh_group(ike_group)
tmp += '-' + pfs_lut[group]
+ # For 'optional' and 'disabled' we need two values as
+ # proposal without '-esn'/'-noesn' is incompatible with
+ # proposals with any of them.
+ if 'esn' in proposal:
+ if proposal['esn'] == 'required':
+ tmp += '-esn'
+ elif proposal['esn'] == 'optional':
+ ciphers.append(tmp + '-esn-noesn')
+ elif proposal['esn'] == 'disabled':
+ ciphers.append(tmp + '-noesn')
+
ciphers.append(tmp)
return ciphers