summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-01-12 10:49:42 +0100
committerChristian Poessinger <christian@poessinger.com>2019-01-12 10:57:52 +0100
commit962f880554e70afc94f8902bb3742a8c0ef44fca (patch)
treeab2b6c8e9e9e38877cbbb80fb5500ffa93975668 /src
parent89884d572bdf50c7d0c81e0f9f69855056f6f416 (diff)
downloadvyos-1x-962f880554e70afc94f8902bb3742a8c0ef44fca.tar.gz
vyos-1x-962f880554e70afc94f8902bb3742a8c0ef44fca.zip
T1041: make upstream DNS server optional
The name-server option under "service dns-forwarding" was never mandatory so users never needed to specify an upstream server. With the recent switch to PowerDNS recursor in VyOS 1.2.0 we will act as a full DNS recursor when there is no upstream DNS server configured. (cherry picked from commit 3c563b3ae8397da33a03c0429c17b97eb9625c5f)
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/dns_forwarding.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/conf_mode/dns_forwarding.py b/src/conf_mode/dns_forwarding.py
index c21a91a30..135f6fec0 100755
--- a/src/conf_mode/dns_forwarding.py
+++ b/src/conf_mode/dns_forwarding.py
@@ -67,8 +67,12 @@ forward-zones={% for d in domains %}
# dnssec
dnssec={{ dnssec }}
+{% if name_servers -%}
# name-server
forward-zones-recurse=.={{ name_servers | join(';') }}
+{% else %}
+# no name-servers specified - start full recursor
+{% endif %}
"""