summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-05-16 07:30:44 +0200
committerGitHub <noreply@github.com>2024-05-16 07:30:44 +0200
commit158dd9a8adfa08d4657eb80a772ce4e0ec9507b5 (patch)
tree2e29a5eea139c61c70f4a413fd949056deab4501 /data
parent70f9fa05da4355c2f9d8cd113b62b7b7ad5b4946 (diff)
parent75d553932504c55e710265776e4865a238223e1f (diff)
downloadvyos-1x-158dd9a8adfa08d4657eb80a772ce4e0ec9507b5.tar.gz
vyos-1x-158dd9a8adfa08d4657eb80a772ce4e0ec9507b5.zip
Merge pull request #3450 from HollyGurza/T5756
T5756: L2TP RADIUS backup and weight settings
Diffstat (limited to 'data')
-rw-r--r--data/templates/accel-ppp/config_chap_secrets_radius.j215
1 files changed, 14 insertions, 1 deletions
diff --git a/data/templates/accel-ppp/config_chap_secrets_radius.j2 b/data/templates/accel-ppp/config_chap_secrets_radius.j2
index 595e3a565..e343ce461 100644
--- a/data/templates/accel-ppp/config_chap_secrets_radius.j2
+++ b/data/templates/accel-ppp/config_chap_secrets_radius.j2
@@ -5,7 +5,20 @@ chap-secrets={{ chap_secrets_file }}
[radius]
verbose=1
{% for server, options in authentication.radius.server.items() if not options.disable is vyos_defined %}
-server={{ server }},{{ options.key }},auth-port={{ options.port }},acct-port={{ options.acct_port }},req-limit=0,fail-time={{ options.fail_time }}
+{% set _server_cfg = "server=" %}
+{% set _server_cfg = _server_cfg + server %}
+{% set _server_cfg = _server_cfg + "," + options.key %}
+{% set _server_cfg = _server_cfg + ",auth-port=" + options.port %}
+{% set _server_cfg = _server_cfg + ",acct-port=" + options.acct_port %}
+{% set _server_cfg = _server_cfg + ",req-limit=0" %}
+{% set _server_cfg = _server_cfg + ",fail-time=" + options.fail_time %}
+{% if options.priority is vyos_defined %}
+{% set _server_cfg = _server_cfg + ",weight=" + options.priority %}
+{% endif %}
+{% if options.backup is vyos_defined %}
+{% set _server_cfg = _server_cfg + ",backup" %}
+{% endif %}
+{{ _server_cfg }}
{% endfor %}
{% if authentication.radius.accounting_interim_interval is vyos_defined %}
acct-interim-interval={{ authentication.radius.accounting_interim_interval }}