summaryrefslogtreecommitdiff
path: root/data/templates/pppoe-server/pppoe.config.tmpl
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-04-18 11:57:49 +0200
committerChristian Poessinger <christian@poessinger.com>2020-04-18 13:25:08 +0200
commitee63d76964e3129e372e5c3fd8bc5bf028fc3874 (patch)
tree3f88ed6526afff9b8b2b27050493ae57fa139748 /data/templates/pppoe-server/pppoe.config.tmpl
parent5a1a7f42b99e84fb356de646533f79fc8b4afc20 (diff)
downloadvyos-1x-ee63d76964e3129e372e5c3fd8bc5bf028fc3874.tar.gz
vyos-1x-ee63d76964e3129e372e5c3fd8bc5bf028fc3874.zip
pppoe-server: T2314: migrate IPv4/IPv6 name-servers to common node
Instead of having "dns-server server-1|server-2" nodes and the same for IPv6 all DNS nameservers are migrated to a common name-servers node.
Diffstat (limited to 'data/templates/pppoe-server/pppoe.config.tmpl')
-rw-r--r--data/templates/pppoe-server/pppoe.config.tmpl26
1 files changed, 10 insertions, 16 deletions
diff --git a/data/templates/pppoe-server/pppoe.config.tmpl b/data/templates/pppoe-server/pppoe.config.tmpl
index f7c639f62..66c8c37ac 100644
--- a/data/templates/pppoe-server/pppoe.config.tmpl
+++ b/data/templates/pppoe-server/pppoe.config.tmpl
@@ -64,32 +64,26 @@ delegate={{ prefix }}
{% endfor %}
{% endif %}
-{% if dns %}
+{% if dnsv4 %}
[dns]
-{% if dns[0] %}
-dns1={{dns[0]}}
-{% endif -%}
-{% if dns[1] %}
-dns2={{dns[1]}}
-{% endif -%}
+{% for dns in dnsv4 -%}
+dns{{ loop.index }}={{ dns }}
+{% endfor -%}
{% endif %}
{% if dnsv6 %}
[ipv6-dns]
-{% for srv in dnsv6: %}
-{{srv}}
-{% endfor %}
+{% for dns in dnsv6 -%}
+{{ dns }}
+{% endfor -%}
{% endif %}
{% if wins %}
[wins]
-{% if wins[0] %}
-wins1={{wins[0]}}
+{% for server in wins -%}
+wins{{ loop.index }}={{ server }}
+{% endfor -%}
{% endif %}
-{% if wins[1] %}
-wins2={{wins[1]}}
-{% endif -%}
-{% endif -%}
{% if auth_mode == 'local' %}
[chap-secrets]