diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-04-10 23:22:17 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-04-11 11:25:13 +0200 |
commit | 762d36d5b71d600e5f286a4f06c806a2e016ae7a (patch) | |
tree | ffc6b79219b7571a0ede87f95ed1feb62e417fc9 /data/templates/l2tp/chap-secrets.tmpl | |
parent | 53932650928688188aa8a5b122293165959f426f (diff) | |
download | vyos-1x-762d36d5b71d600e5f286a4f06c806a2e016ae7a.tar.gz vyos-1x-762d36d5b71d600e5f286a4f06c806a2e016ae7a.zip |
vpn: l2tp: T2264: migrate to new dictionary keys for local auth
Diffstat (limited to 'data/templates/l2tp/chap-secrets.tmpl')
-rw-r--r-- | data/templates/l2tp/chap-secrets.tmpl | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/data/templates/l2tp/chap-secrets.tmpl b/data/templates/l2tp/chap-secrets.tmpl index 0db295fdc..dd00d7bd0 100644 --- a/data/templates/l2tp/chap-secrets.tmpl +++ b/data/templates/l2tp/chap-secrets.tmpl @@ -1,10 +1,10 @@ -# username server password acceptable local IP addresses shaper -{% for user in authentication['local-users'] %} -{% if authentication['local-users'][user]['state'] == 'enabled' %} -{% if authentication['local-users'][user]['upload'] and authentication['local-users'][user]['download'] %} -{{ "%-12s" | format(user) }} * {{ "%-16s" | format(authentication['local-users'][user]['passwd']) }} {{ "%-16s" | format(authentication['local-users'][user]['ip']) }} {{ authentication['local-users'][user]['download'] }} / {{ authentication['local-users'][user]['upload'] }} +# username server password acceptable local IP addresses shaper +{% for user in local_users %} +{% if user.state == 'enabled' %} +{% if user.upload and user.download %} +{{ "%-12s" | format(user.name) }} * {{ "%-16s" | format(user.password) }} {{ "%-16s" | format(user.ip) }} {{ user.download }} / {{ user.upload }} {% else %} -{{ "%-12s" | format(user) }} * {{ "%-16s" | format(authentication['local-users'][user]['passwd']) }} {{ "%-16s" | format(authentication['local-users'][user]['ip']) }} +{{ "%-12s" | format(user.name) }} * {{ "%-16s" | format(user.password) }} {{ "%-16s" | format(user.ip) }} {% endif %} {% endif %} {% endfor %} |