diff options
| author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2025-07-28 12:26:07 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-28 12:26:07 +0300 |
| commit | fc5ea5bdf1a1fb0092d2f4847b100b29f1ac25a4 (patch) | |
| tree | 1fad54f8b926891bd6d51e109816302fc2127e5d /data | |
| parent | b7a647ab55d6851205e2c5b53a5fe0c17c5146fe (diff) | |
| parent | 46a0e2cfc99a41a43fbcede2f02d8ad8f98daffb (diff) | |
| download | vyos-1x-fc5ea5bdf1a1fb0092d2f4847b100b29f1ac25a4.tar.gz vyos-1x-fc5ea5bdf1a1fb0092d2f4847b100b29f1ac25a4.zip | |
Merge pull request #4624 from alexandr-san4ez/T7581-current
ipsec: T7581: Fix unsupported 'all' protocol in site-to-site tunnels after upgrade to 1.4.x
Diffstat (limited to 'data')
| -rw-r--r-- | data/templates/ipsec/swanctl/peer.j2 | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/data/templates/ipsec/swanctl/peer.j2 b/data/templates/ipsec/swanctl/peer.j2 index cf0865c88..b6b5d2dac 100644 --- a/data/templates/ipsec/swanctl/peer.j2 +++ b/data/templates/ipsec/swanctl/peer.j2 @@ -111,6 +111,12 @@ {% set tunnel_esp_name = tunnel_conf.esp_group if tunnel_conf.esp_group is vyos_defined else peer_conf.default_esp_group %} {% set tunnel_esp = esp_group[tunnel_esp_name] %} {% set proto = tunnel_conf.protocol if tunnel_conf.protocol is vyos_defined else '' %} +{# VyOS 1.3.x (with strongSwan 5.7.x) previously allowed using `all` in traffic selectors, converting it to `%any`. #} +{# In strongSwan 5.9.x (VyOS >= 1.4.x), the syntax `x.x.x.0/24[all/]` is no longer accepted. #} +{# We must now explicitly specify a protocol (e.g., `tcp`, `udp`). #} +{# To achieve "all" protocol behavior, simply use the subnet notation without brackets, #} +{# such as `x.x.x.0/24` or `x.x.x.0/24[/443]`. #} +{% set proto = '' if proto == 'all' else proto %} {% set local_port = tunnel_conf.local.port if tunnel_conf.local.port is vyos_defined else '' %} {% set local_suffix = '[{0}/{1}]'.format(proto, local_port) if proto or local_port else '' %} {% set remote_port = tunnel_conf.remote.port if tunnel_conf.remote.port is vyos_defined else '' %} |
