From ee63d76964e3129e372e5c3fd8bc5bf028fc3874 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 18 Apr 2020 11:57:49 +0200 Subject: 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. --- data/templates/pppoe-server/pppoe.config.tmpl | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) (limited to 'data/templates') 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] -- cgit v1.2.3