]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
allow glue in authoritative responses to root priming queries
authorEvan Hunt <each@isc.org>
Tue, 18 Jun 2019 00:11:00 +0000 (17:11 -0700)
committerEvan Hunt <each@isc.org>
Wed, 26 Jun 2019 15:53:42 +0000 (08:53 -0700)
- when processing authoritative queries for ./NS, set 'gluedb' so
  that glue will be included in the response, regardless of how
  'minimal-responses' has been configured.

lib/ns/query.c

index d990f4a1504a899545b15b54287fda8b9ac0919d..9c8086cfc9f640b287247dc6f68177947b601e15 100644 (file)
@@ -7279,11 +7279,13 @@ query_respond(query_ctx_t *qctx) {
                }
 
                /*
-                * BIND 8 priming queries need the additional section.
+                * Always add glue for root priming queries, regardless
+                * of "minimal-responses" setting.
                 */
                if (dns_name_equal(qctx->client->query.qname, dns_rootname)) {
                        qctx->client->query.attributes &=
                                ~NS_QUERYATTR_NOADDITIONAL;
+                       dns_db_attach(qctx->db, &qctx->client->query.gluedb);
                }
        }
 
@@ -10671,6 +10673,10 @@ ns_query_done(query_ctx_t *qctx) {
        qctx_clean(qctx);
        qctx_freedata(qctx);
 
+       if (qctx->client->query.gluedb != NULL) {
+               dns_db_detach(&qctx->client->query.gluedb);
+       }
+
        /*
         * Clear the AA bit if we're not authoritative.
         */