From: Evan Hunt Date: Tue, 18 Jun 2019 00:11:00 +0000 (-0700) Subject: allow glue in authoritative responses to root priming queries X-Git-Tag: v9.11.9~12^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff4855d358232640a8d2055c32499fa63ebf5fbc;p=thirdparty%2Fbind9.git allow glue in authoritative responses to root priming queries - 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) --- diff --git a/bin/named/query.c b/bin/named/query.c index b34d7e8fb55..2a54144d8a3 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. */