summaryrefslogtreecommitdiff
path: root/data/templates/ipoe-server/chap-secrets.tmpl
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-04-18 21:36:04 +0200
committerChristian Poessinger <christian@poessinger.com>2020-04-18 21:36:04 +0200
commit0ffdf24983507bb8140e6d30343993059abfc4dd (patch)
tree53b21eb45fde4621f49a54286db1f94fe4bfe05f /data/templates/ipoe-server/chap-secrets.tmpl
parent0988b60f813cb1659785e0e92a165052f7d67311 (diff)
parent68ebb2a39c6d98a4d2cc25b9b84e4a9594238608 (diff)
downloadvyos-1x-0ffdf24983507bb8140e6d30343993059abfc4dd.tar.gz
vyos-1x-0ffdf24983507bb8140e6d30343993059abfc4dd.zip
Merge branch 'ipoe-server' of github.com:c-po/vyos-1x into current
* 'ipoe-server' of github.com:c-po/vyos-1x: pppoe-server: T2314: fix RADIUS migration vyos.configtree: bugfix exception message used non existent variable ipoe-server: T2324: migrate RADIUS configuration to common CLI syntax ipoe-server: T2324: migrate IPv4/IPv6 name-servers to common node ipoe-server: T2324: remove boilerplate code and adjust to other accel implementations router-advert: rename XML/Python files for a common pattern ipoe-server: rename XML/Python files for a common pattern
Diffstat (limited to 'data/templates/ipoe-server/chap-secrets.tmpl')
-rw-r--r--data/templates/ipoe-server/chap-secrets.tmpl18
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 -%}