]> 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 16:21:05 +0000 (09:21 -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.

(cherry picked from commit e7684c7b640c838308e43911477ace171db1597a)

lib/ns/query.c

index 96c9c7d8fe0b799bbce98498f0ee66fce447baf3..fe06b6c5baed6d62302f1283953b74b44baec738 100644 (file)
@@ -7281,11 +7281,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);
                }
        }
 
@@ -10673,6 +10675,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.
         */