summaryrefslogtreecommitdiff
path: root/data/templates/accel-ppp/chap-secrets.ipoe.j2
diff options
context:
space:
mode:
Diffstat (limited to 'data/templates/accel-ppp/chap-secrets.ipoe.j2')
-rw-r--r--data/templates/accel-ppp/chap-secrets.ipoe.j213
1 files changed, 13 insertions, 0 deletions
diff --git a/data/templates/accel-ppp/chap-secrets.ipoe.j2 b/data/templates/accel-ppp/chap-secrets.ipoe.j2
new file mode 100644
index 0000000..43083e2
--- /dev/null
+++ b/data/templates/accel-ppp/chap-secrets.ipoe.j2
@@ -0,0 +1,13 @@
+# username server password acceptable local IP addresses shaper
+{% if authentication.interface is vyos_defined %}
+{% for iface, iface_config in authentication.interface.items() %}
+{% if iface_config.mac is vyos_defined %}
+{% for mac, mac_config in iface_config.mac.items() %}
+{% if mac_config.vlan is vyos_defined %}
+{% set iface = iface ~ '.' ~ mac_config.vlan %}
+{% endif %}
+{{ "%-11s" | format(iface) }} * {{ mac | lower }} * {{ mac_config.rate_limit.download ~ '/' ~ mac_config.rate_limit.upload if mac_config.rate_limit.download is vyos_defined and mac_config.rate_limit.upload is vyos_defined }}
+{% endfor %}
+{% endif %}
+{% endfor %}
+{% endif %}