diff options
author | Benjamin M. Hughes <bmhughes@bmhughes.co.uk> | 2022-09-06 16:22:49 +0100 |
---|---|---|
committer | Benjamin M. Hughes <bmhughes@bmhughes.co.uk> | 2022-09-06 16:24:56 +0100 |
commit | 4f2dcc9362ee8fae8e57a168a987a5db36b77a68 (patch) | |
tree | f0b1a412c465b86c0cac8ad5fc0f2bb48ac36052 /data/templates/login/pam_radius_auth.conf.j2 | |
parent | 31138f43f4a5714077adbbd22ff774b2d4ce37f8 (diff) | |
download | vyos-1x-4f2dcc9362ee8fae8e57a168a987a5db36b77a68.tar.gz vyos-1x-4f2dcc9362ee8fae8e57a168a987a5db36b77a68.zip |
radius: T4672: Fix RADIUS server disable template logic
Diffstat (limited to 'data/templates/login/pam_radius_auth.conf.j2')
-rw-r--r-- | data/templates/login/pam_radius_auth.conf.j2 | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/data/templates/login/pam_radius_auth.conf.j2 b/data/templates/login/pam_radius_auth.conf.j2 index 1105b60e5..c61154753 100644 --- a/data/templates/login/pam_radius_auth.conf.j2 +++ b/data/templates/login/pam_radius_auth.conf.j2 @@ -16,7 +16,7 @@ {% if radius.server is vyos_defined %} # server[:port] shared_secret timeout source_ip {# .items() returns a tuple of two elements: key and value. 1 relates to the 2nd element i.e. the value and .priority relates to the key from the internal dict #} -{% for server, options in radius.server.items() | sort(attribute='1.priority') if not options.disabled %} +{% for server, options in radius.server.items() | sort(attribute='1.priority') if not 'disable' in options %} {# RADIUS IPv6 servers must be specified in [] notation #} {% if server | is_ipv4 %} {{ server }}:{{ options.port }} {{ "%-25s" | format(options.key) }} {{ "%-10s" | format(options.timeout) }} {{ source_address.ipv4 if source_address.ipv4 is vyos_defined }} @@ -33,4 +33,3 @@ mapped_priv_user radius_priv_user vrf-name {{ radius.vrf }} {% endif %} {% endif %} - |