From bdefe71d081bb8dcd5e9c8699bcf5c17d9d3ede5 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sat, 22 Oct 2011 22:10:26 +0200 Subject: [PATCH 1/1] Root hints are emitted only when asked for This makes it possible to configure servers which serve only locally defined zones, and also servers with multiple views. --- README | 7 +++++++ cf.dist/domains | 3 +++ m4/mkconf.m4 | 14 +++++++++----- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/README b/README index 6ddfb09..4e6b56b 100644 --- a/README +++ b/README @@ -139,6 +139,13 @@ REVERSE(network, primary-files...) You can also use the REV macro explicitly, which can be handy for example in SECONDARY declarations. +ROOTHINT() + Insert a definition of hints for reaching root servers into named.conf. + This is necessary if you want your DNS server to resolve foreign + domains; otherwise, it will only give out authoritative answers + for locally defined zones and forward queries. The location of the + file with the hints can be set by the ROOTCACHE directive (see below). + FORWARDED(zone, ip...) Define a forwarding zone. All queries are forwarded to the specified name servers. diff --git a/cf.dist/domains b/cf.dist/domains index e1be8a8..b897470 100644 --- a/cf.dist/domains +++ b/cf.dist/domains @@ -1,5 +1,8 @@ ; An example domain table for the NSC +; Hints how to find root servers +ROOTHINT() + ; Various mandatory things required by RFC 1912, section 4.1 PRIMARY(localhost) REVERSE(127.0.0, localhost) diff --git a/m4/mkconf.m4 b/m4/mkconf.m4 index 8392b4d..ebf6532 100644 --- a/m4/mkconf.m4 +++ b/m4/mkconf.m4 @@ -48,6 +48,15 @@ define(`BLACKHOLE', `divert(0)zone "$1" in { divert(-1)') +# Root hint zone + +define(`ROOTHINT', `divert(0)zone "." in { + type hint; + file "ROOTCACHE"; +}; + +divert(-1)') + # Manual insertion of config file material define(`CONFIG', `divert(0)$1 @@ -68,9 +77,4 @@ divert(0)dnl `#' Please don't edit manually `#' -zone "." in { - type hint; - file "ROOTCACHE"; -}; - divert(-1) -- 2.39.2