]> 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:27:22 +0000 (09:27 -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)

bin/named/query.c

index b34d7e8fb55d53330844fdbf2cc6daaf1b39e4f4..2a54144d8a379152085eb88b9a51441804ff3e63 100644 (file)
@@ -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.
         */