From 4bae0a429fee3760640260331b920489e10c2f9d Mon Sep 17 00:00:00 2001
From: Ralf Jung <post@ralfj.de>
Date: Wed, 27 Dec 2017 00:21:08 +0100
Subject: [PATCH] docs: dns-cache: explain setting dns.servers a bit more
 (#1268)

---
 docs/features/dns-cache.rst       | 15 +++++++++++----
 package/gluon-core/check_site.lua |  2 +-
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/docs/features/dns-cache.rst b/docs/features/dns-cache.rst
index cb23b268c..15c5fdf27 100644
--- a/docs/features/dns-cache.rst
+++ b/docs/features/dns-cache.rst
@@ -14,10 +14,17 @@ There are the following settings:
     servers
     cacheentries
 
-If both options are set the node will cache as much DNS records as set with
-'cacheentries' in RAM. The 'servers' list will be used to resolve the received
-DNS queries if the request cannot be answered from cache.
-If these settings do not exist, the cache is not intialized and RAM usage will not increase.
+To use the node's DNS server, both options should be set. The node will cache at
+most 'cacheentries' many DNS records in RAM. The 'servers' list will be used to
+resolve the received DNS queries if the request cannot be answered from
+cache. Gateways should announce the "next node" address via DHCP and RDNSS (if
+any). Note that not setting 'servers' here will lead to DNS not working: Once
+the gateways all announce the "next node" address for DNS, there is no way for
+nodes to automatically determine DNS servers. They have to be baked into the
+firmware.
+
+If these settings do not exist, the cache is not initialized and RAM usage will
+not increase.
 
 When next_node.name is set, an A record and an AAAA record for the
 next-node IP address are placed in the dnsmasq configuration. This means that the content
diff --git a/package/gluon-core/check_site.lua b/package/gluon-core/check_site.lua
index 14d102a02..72fce8a41 100644
--- a/package/gluon-core/check_site.lua
+++ b/package/gluon-core/check_site.lua
@@ -42,7 +42,7 @@ end
 need_boolean('poe_passthrough', false)
 if need_table('dns', nil, false) then
 	need_number('dns.cacheentries', false)
-	need_string_array_match('dns.servers', '^[%x:]+$', false)
+	need_string_array_match('dns.servers', '^[%x:]+$', true)
 end
 
 if need_table('next_node', nil, false) then
-- 
GitLab