summaryrefslogtreecommitdiff
path: root/data/templates/ipoe-server/chap-secrets.tmpl
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-04-05 22:55:53 +0200
committerChristian Poessinger <christian@poessinger.com>2020-04-05 22:55:53 +0200
commit83918922891591f340ba3e0e2cf9d497ac467d1a (patch)
tree2f59b9504ebc2b6bb72a190ab3dccccb31244beb /data/templates/ipoe-server/chap-secrets.tmpl
parentebb54c107e308bca73275cf0e5fc5075f800526e (diff)
downloadvyos-1x-83918922891591f340ba3e0e2cf9d497ac467d1a.tar.gz
vyos-1x-83918922891591f340ba3e0e2cf9d497ac467d1a.zip
ipoe-server: T2230: move inlined templates to dedicated files
Diffstat (limited to 'data/templates/ipoe-server/chap-secrets.tmpl')
-rw-r--r--data/templates/ipoe-server/chap-secrets.tmpl18
1 files changed, 18 insertions, 0 deletions
diff --git a/data/templates/ipoe-server/chap-secrets.tmpl b/data/templates/ipoe-server/chap-secrets.tmpl
new file mode 100644
index 000000000..707718e94
--- /dev/null
+++ b/data/templates/ipoe-server/chap-secrets.tmpl
@@ -0,0 +1,18 @@
+# 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']}}\t*\t{{mac.lower()}}\t*\t{{auth['auth_if'][aifc][mac]['down']}}/{{auth['auth_if'][aifc][mac]['up']}}
+{% else %}
+{{aifc}}\t*\t{{mac.lower()}}\t*\t{{auth['auth_if'][aifc][mac]['down']}}/{{auth['auth_if'][aifc][mac]['up']}}
+{% endif %}
+{% else %}
+{% if auth['auth_if'][aifc][mac]['vlan'] %}
+{{aifc}}.{{auth['auth_if'][aifc][mac]['vlan']}}\t*\t{{mac.lower()}}\t*
+{% else %}
+{{aifc}}\t*\t{{mac.lower()}}\t*
+{% endif %}
+{% endif %}
+{% endfor %}
+{% endfor %}