diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-09-15 19:13:43 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-09-15 19:39:22 +0200 |
commit | 74878d14157408ef3a4c42f32608dcd5bbf812a1 (patch) | |
tree | f36c98e6b95bf4255d6fbb1692d4130630d75a03 /data | |
parent | bcb1bffec87aaab9980e52ae297bd0ff588159b9 (diff) | |
download | vyos-1x-74878d14157408ef3a4c42f32608dcd5bbf812a1.tar.gz vyos-1x-74878d14157408ef3a4c42f32608dcd5bbf812a1.zip |
ipsec: T3830: set connections.<conn>.remote<suffix>.id to "peer" if undefined
Restore "default" behavior from ipsec.conf
Diffstat (limited to 'data')
-rw-r--r-- | data/templates/ipsec/swanctl/peer.tmpl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/data/templates/ipsec/swanctl/peer.tmpl b/data/templates/ipsec/swanctl/peer.tmpl index 951a1b22c..5d69b3d66 100644 --- a/data/templates/ipsec/swanctl/peer.tmpl +++ b/data/templates/ipsec/swanctl/peer.tmpl @@ -42,9 +42,9 @@ {% endif %} } remote { -{% if peer_conf.authentication.remote_id is defined %} +{% if peer_conf.authentication is defined and peer_conf.authentication.remote_id is defined and peer_conf.authentication.remote_id is not none %} id = "{{ peer_conf.authentication.remote_id }}" -{% elif peer[0:1] == '@' %} +{% else %} id = "{{ peer }}" {% endif %} auth = {{ 'psk' if peer_conf.authentication.mode == 'pre-shared-secret' else 'pubkey' }} |