diff options
author | Daniil Baturin <daniil@vyos.io> | 2024-05-16 10:12:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-16 10:12:01 +0200 |
commit | bfec382819adb46a9b7092fa70eaa545e8478eb0 (patch) | |
tree | 3206da1cfb68c37a67d068e3da619721c65bf770 /data/templates/accel-ppp/config_chap_secrets_radius.j2 | |
parent | d9f1c7c17a850388bbe2a3e430ee206e4d149c29 (diff) | |
parent | 2d5bb0230757ff683be4400caffdf7127bc61fad (diff) | |
download | vyos-1x-bfec382819adb46a9b7092fa70eaa545e8478eb0.tar.gz vyos-1x-bfec382819adb46a9b7092fa70eaa545e8478eb0.zip |
Merge pull request #3460 from vyos/mergify/bp/sagitta/pr-3450
T5756: L2TP RADIUS backup and weight settings (backport #3450)
Diffstat (limited to 'data/templates/accel-ppp/config_chap_secrets_radius.j2')
-rw-r--r-- | data/templates/accel-ppp/config_chap_secrets_radius.j2 | 15 |
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 }} |