diff --git a/CHANGES b/CHANGES
index 800d3124fb..86e5d490cc 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+5256. [bug] Ensure that glue records are included in root
+ priming responses if "minimal-responses" is not
+ set to "yes". [GL #1092]
+
5255. [bug] Errors encountered while reloading inline-signing
zones could be ignored, causing the zone content to
be left in an incompletely updated state rather than
diff --git a/bin/named/query.c b/bin/named/query.c
index b34d7e8fb5..2a54144d8a 100644
--- a/bin/named/query.c
+++ b/bin/named/query.c
@@ -9028,11 +9028,13 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
}
/*
- * BIND 8 priming queries need the additional section.
+ * Always add glue for root priming queries, regardless
+ * of "minimal-responses" setting.
*/
if (dns_name_equal(client->query.qname, dns_rootname)) {
client->query.attributes &=
~NS_QUERYATTR_NOADDITIONAL;
+ dns_db_attach(db, &client->query.gluedb);
}
}
@@ -9184,6 +9186,10 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
free_devent(client, ISC_EVENT_PTR(&event), &event);
}
+ if (client->query.gluedb != NULL) {
+ dns_db_detach(&client->query.gluedb);
+ }
+
/*
* AA bit.
*/
diff --git a/bin/tests/system/additional/ns1/named1.conf.in b/bin/tests/system/additional/ns1/named1.conf.in
index dcaf81cb41..ad0079704e 100644
--- a/bin/tests/system/additional/ns1/named1.conf.in
+++ b/bin/tests/system/additional/ns1/named1.conf.in
@@ -29,6 +29,11 @@ controls {
inet 10.53.0.1 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
};
+zone "." {
+ type master;
+ file "root.db";
+};
+
zone "rt.example" {
type master;
file "rt.db";
diff --git a/bin/tests/system/additional/ns1/named2.conf.in b/bin/tests/system/additional/ns1/named2.conf.in
index cd0a15efdb..30a19b13a5 100644
--- a/bin/tests/system/additional/ns1/named2.conf.in
+++ b/bin/tests/system/additional/ns1/named2.conf.in
@@ -29,6 +29,11 @@ controls {
inet 10.53.0.1 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
};
+zone "." {
+ type master;
+ file "root.db";
+};
+
zone "rt.example" {
type master;
file "rt.db";
diff --git a/bin/tests/system/additional/ns1/named3.conf.in b/bin/tests/system/additional/ns1/named3.conf.in
index 8b5248b4d3..fe442b1db4 100644
--- a/bin/tests/system/additional/ns1/named3.conf.in
+++ b/bin/tests/system/additional/ns1/named3.conf.in
@@ -30,6 +30,11 @@ controls {
inet 10.53.0.1 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
};
+zone "." {
+ type master;
+ file "root.db";
+};
+
zone "rt.example" {
type master;
file "rt.db";
diff --git a/bin/tests/system/additional/ns1/named4.conf.in b/bin/tests/system/additional/ns1/named4.conf.in
index eb503febc7..221566986b 100644
--- a/bin/tests/system/additional/ns1/named4.conf.in
+++ b/bin/tests/system/additional/ns1/named4.conf.in
@@ -29,6 +29,11 @@ controls {
inet 10.53.0.1 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
};
+zone "." {
+ type master;
+ file "root.db";
+};
+
zone "mx.example" {
type master;
file "mx.db";
diff --git a/bin/tests/system/additional/ns1/root.db b/bin/tests/system/additional/ns1/root.db
new file mode 100644
index 0000000000..7db363b2bf
--- /dev/null
+++ b/bin/tests/system/additional/ns1/root.db
@@ -0,0 +1,19 @@
+; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+;
+; This Source Code Form is subject to the terms of the Mozilla Public
+; License, v. 2.0. If a copy of the MPL was not distributed with this
+; file, You can obtain one at http://mozilla.org/MPL/2.0/.
+;
+; See the COPYRIGHT file distributed with this work for additional
+; information regarding copyright ownership.
+
+. IN SOA ns2. hostmaster ( 2 8H 2H 4W 1D);
+. NS ns1.rt.example.
+. NS ns2.rt.example.
+ns1.rt.example. A 10.53.0.1
+ns2.rt.example. A 10.53.0.2
+rt.example. NS ns1.
+naptr.example. NS ns1.
+rt2.example. NS ns1.
+naptr2.example. NS ns1.
+nid.example. NS ns1.
diff --git a/bin/tests/system/additional/tests.sh b/bin/tests/system/additional/tests.sh
index 692af541ff..dc537ccf99 100644
--- a/bin/tests/system/additional/tests.sh
+++ b/bin/tests/system/additional/tests.sh
@@ -210,6 +210,38 @@ dotests() {
if [ $ret -eq 1 ] ; then
echo_i " failed"; status=1
fi
+
+ n=`expr $n + 1`
+ echo_i "test with NS, root zone ($n)"
+ ret=0
+ $DIG $DIGOPTS -t NS . @10.53.0.1 > dig.out.$n || ret=1
+ # Always expect glue for root priming queries, regardless $minimal
+ grep 'ADDITIONAL: 3' dig.out.$n > /dev/null || ret=1
+ if [ $ret -eq 1 ] ; then
+ echo_i " failed"; status=1
+ fi
+
+ n=`expr $n + 1`
+ echo_i "test with NS, non-root zone ($n)"
+ ret=0
+ $DIG $DIGOPTS -t NS rt.example @10.53.0.1 > dig.out.$n || ret=1
+ case $minimal in
+ yes)
+ grep 'ADDITIONAL: 1' dig.out.$n > /dev/null || ret=1
+ ;;
+ no)
+ grep 'ADDITIONAL: 2' dig.out.$n > /dev/null || ret=1
+ ;;
+ no-auth)
+ grep 'ADDITIONAL: 2' dig.out.$n > /dev/null || ret=1
+ ;;
+ no-auth-recursive)
+ grep 'ADDITIONAL: 2' dig.out.$n > /dev/null || ret=1
+ ;;
+ esac
+ if [ $ret -eq 1 ] ; then
+ echo_i " failed"; status=1
+ fi
}
echo_i "testing with 'minimal-responses yes;'"
diff --git a/doc/arm/notes.xml b/doc/arm/notes.xml
index cd0aa85704..0b4400c2fb 100644
--- a/doc/arm/notes.xml
+++ b/doc/arm/notes.xml
@@ -81,6 +81,17 @@
+ Bug Fixes
+
+
+
+ Glue address records were not being returned in responses
+ to root priming queries; this has been corrected. [GL #1092]
+
+
+
+
+
End of Life
BIND 9.11 (Extended Support Version) will be supported until at
diff --git a/util/copyrights b/util/copyrights
index ab830bf96c..10ba42a469 100644
--- a/util/copyrights
+++ b/util/copyrights
@@ -524,6 +524,7 @@
./bin/tests/system/additional/ns1/naptr.db ZONE 2013,2016,2018,2019
./bin/tests/system/additional/ns1/naptr2.db ZONE 2013,2016,2018,2019
./bin/tests/system/additional/ns1/nid.db ZONE 2013,2016,2018,2019
+./bin/tests/system/additional/ns1/root.db ZONE 2019
./bin/tests/system/additional/ns1/rt.db ZONE 2013,2016,2018,2019
./bin/tests/system/additional/ns1/rt2.db ZONE 2013,2016,2018,2019
./bin/tests/system/additional/ns1/srv.db ZONE 2016,2018,2019