From 160b70f4177b14b682119cd22e75bdfc089545b1 Mon Sep 17 00:00:00 2001 From: Wouter Wijngaards Date: Tue, 11 Jul 2017 14:29:54 +0000 Subject: [PATCH] - Redirect all localhost names to localhost address for RFC6761. git-svn-id: file:///svn/unbound/trunk@4273 be551aaa-1e26-0410-a405-d3ace91eadb9 --- doc/Changelog | 1 + services/localzone.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/Changelog b/doc/Changelog index 9b62c7574..293db449f 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,5 +1,6 @@ 11 July 2017: Wouter - Fix #1344: RFC6761-reserved domains: test. and invalid. + - Redirect all localhost names to localhost address for RFC6761. 6 July 2017: Wouter - Fix tests to use .tdir (from Manu Bretelle) instead of .tpkg. diff --git a/services/localzone.c b/services/localzone.c index d0c7c08f4..1215f27d5 100644 --- a/services/localzone.c +++ b/services/localzone.c @@ -762,7 +762,7 @@ int local_zone_enter_defaults(struct local_zones* zones, struct config_file* cfg /* localhost. zone */ if(!lz_exists(zones, "localhost.") && !lz_nodefault(cfg, "localhost.")) { - if(!(z=lz_enter_zone(zones, "localhost.", "static", + if(!(z=lz_enter_zone(zones, "localhost.", "redirect", LDNS_RR_CLASS_IN)) || !lz_enter_rr_into_zone(z, "localhost. 10800 IN NS localhost.") ||