diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-04-18 17:56:19 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-04-18 17:56:19 +0200 |
commit | e9a2c4b96edc52ea114451ece6884845ad18ba6f (patch) | |
tree | bbaf2bcaf8d8b081219e720820cca631dd934e2c /data/templates/ipoe-server/chap-secrets.tmpl | |
parent | 03c9155cd012a56c9454b396c5db7785abb80b0a (diff) | |
download | vyos-1x-e9a2c4b96edc52ea114451ece6884845ad18ba6f.tar.gz vyos-1x-e9a2c4b96edc52ea114451ece6884845ad18ba6f.zip |
ipoe-server: T2324: remove boilerplate code and adjust to other accel implementations
Diffstat (limited to 'data/templates/ipoe-server/chap-secrets.tmpl')
-rw-r--r-- | data/templates/ipoe-server/chap-secrets.tmpl | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/data/templates/ipoe-server/chap-secrets.tmpl b/data/templates/ipoe-server/chap-secrets.tmpl index 5e35d5775..a7d899354 100644 --- a/data/templates/ipoe-server/chap-secrets.tmpl +++ b/data/templates/ipoe-server/chap-secrets.tmpl @@ -1,17 +1,17 @@ # username server password acceptable local IP addresses shaper -{% for aifc in auth['auth_if'] -%} -{% for mac in auth['auth_if'][aifc] -%} -{% if (auth['auth_if'][aifc][mac]['up']) and (auth['auth_if'][aifc][mac]['down']) -%} -{% if auth['auth_if'][aifc][mac]['vlan'] -%} -{{aifc}}.{{auth['auth_if'][aifc][mac]['vlan']}} * {{mac.lower()}} * {{auth['auth_if'][aifc][mac]['down']}}/{{auth['auth_if'][aifc][mac]['up']}} +{% for interface in auth_interfaces -%} +{% for mac in interface.mac -%} +{% if mac.rate_upload and mac.rate_download -%} +{% if mac.vlan_id -%} +{{ interface.name }}.{{ mac.vlan_id }} * {{ mac.address | lower }} * {{ mac.rate_download }}/{{ mac.rate_upload }} {% else -%} -{{aifc}} * {{mac.lower()}} * {{auth['auth_if'][aifc][mac]['down']}}/{{auth['auth_if'][aifc][mac]['up']}} +{{ interface.name }} * {{ mac.address | lower }} * {{ mac.rate_download }}/{{ mac.rate_upload }} {% endif -%} {% else -%} -{% if auth['auth_if'][aifc][mac]['vlan'] %} -{{aifc}}.{{auth['auth_if'][aifc][mac]['vlan']}} * {{mac.lower()}} * +{% if mac.vlan_id -%} +{{ interface.name }}.{{ mac.vlan_id }} * {{ mac.address | lower }} * {% else -%} -{{aifc}} * {{mac.lower()}} * +{{ interface.name }} * {{ mac.address | lower }} * {% endif -%} {% endif -%} {% endfor -%} |