summaryrefslogtreecommitdiff
path: root/data/templates/ipsec/charon/eap-radius.conf.tmpl
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-04-13 22:51:42 +0200
committerChristian Poessinger <christian@poessinger.com>2022-04-13 22:51:42 +0200
commite8a637eec0cc398f78a877ece6b9c7cdca418970 (patch)
treed5950ea33e209a3a290b617d501807959102a9d0 /data/templates/ipsec/charon/eap-radius.conf.tmpl
parentfc36d67b051bad776a5b1d6e9a04f1205487f01f (diff)
downloadvyos-1x-e8a637eec0cc398f78a877ece6b9c7cdca418970.tar.gz
vyos-1x-e8a637eec0cc398f78a877ece6b9c7cdca418970.zip
ipsec: T4333: migrate to new vyos_defined Jinja2 test
Diffstat (limited to 'data/templates/ipsec/charon/eap-radius.conf.tmpl')
-rw-r--r--data/templates/ipsec/charon/eap-radius.conf.tmpl8
1 files changed, 4 insertions, 4 deletions
diff --git a/data/templates/ipsec/charon/eap-radius.conf.tmpl b/data/templates/ipsec/charon/eap-radius.conf.tmpl
index 5ec35c988..b58022521 100644
--- a/data/templates/ipsec/charon/eap-radius.conf.tmpl
+++ b/data/templates/ipsec/charon/eap-radius.conf.tmpl
@@ -41,7 +41,7 @@ eap-radius {
load = yes
# NAS-Identifier to include in RADIUS messages.
- nas_identifier = {{ remote_access.radius.nas_identifier if remote_access is defined and remote_access.radius is defined and remote_access.radius.nas_identifier is defined else 'strongSwan' }}
+ nas_identifier = {{ remote_access.radius.nas_identifier if remote_access.radius.nas_identifier is vyos_defined else 'strongSwan' }}
# Port of RADIUS server (authentication).
# port = 1812
@@ -94,13 +94,13 @@ eap-radius {
# Section to specify multiple RADIUS servers.
servers {
-{% if remote_access is defined and remote_access.radius is defined and remote_access.radius.server is defined %}
-{% for server, server_options in remote_access.radius.server.items() if server_options.disable is not defined %}
+{% if remote_access.radius.server is vyos_defined %}
+{% for server, server_options in remote_access.radius.server.items() if server_options.disable is not vyos_defined %}
{{ server | replace('.', '-') }} {
address = {{ server }}
secret = {{ server_options.key }}
auth_port = {{ server_options.port }}
-{% if server_options.disable_accounting is not defined %}
+{% if server_options.disable_accounting is not vyos_defined %}
acct_port = {{ server_options.port | int +1 }}
{% endif %}
sockets = 20