summaryrefslogtreecommitdiff
path: root/data/templates
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-04-10 19:32:24 +0200
committerChristian Poessinger <christian@poessinger.com>2020-04-11 11:25:13 +0200
commit6a2e75dbe4003c6987c6932296e68c486ff7b380 (patch)
tree020236a6a5cbf98832c0dcfd3dac682a95db2bce /data/templates
parentc2ae1ca3be86abfdba418a738785c8a217f6245f (diff)
downloadvyos-1x-6a2e75dbe4003c6987c6932296e68c486ff7b380.tar.gz
vyos-1x-6a2e75dbe4003c6987c6932296e68c486ff7b380.zip
vpn: l2tp: T2264: combine IPv4/IPv6 name-server CLI syntax
There is no reason to distinguish between an IPv4 and IPv6 name-server node on the CLI - this can be done in the underlaying Python scripts.
Diffstat (limited to 'data/templates')
-rw-r--r--data/templates/l2tp/l2tp.config.tmpl17
1 files changed, 7 insertions, 10 deletions
diff --git a/data/templates/l2tp/l2tp.config.tmpl b/data/templates/l2tp/l2tp.config.tmpl
index b8637e256..bea2943d2 100644
--- a/data/templates/l2tp/l2tp.config.tmpl
+++ b/data/templates/l2tp/l2tp.config.tmpl
@@ -23,21 +23,18 @@ syslog=accel-l2tp,daemon
copy=1
level=5
-{% if dns %}
+{% if dnsv4 %}
[dns]
-{% if dns[0] %}
-dns1={{dns[0]}}
-{% endif %}
-{% if dns[1] %}
-dns2={{dns[1]}}
+{% for dns in dnsv4 -%}
+dns{{ loop.index }}={{ dns }}
+{% endfor -%}
{% endif %}
-{% endif -%}
{% if dnsv6 %}
[ipv6-dns]
-{% for srv in dnsv6: %}
-{{srv}}
-{% endfor %}
+{% for dns in dnsv6 -%}
+{{ dns }}
+{% endfor -%}
{% endif %}
{% if wins %}