mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 05:28:00 +00:00
2290. [bug] Let AD in the query signal that the client wants AD
set in the response. [RT #17301]
This commit is contained in:
parent
562460463b
commit
2678fccde3
3
CHANGES
3
CHANGES
@ -1,3 +1,6 @@
|
||||
2290. [bug] Let AD in the query signal that the client wants AD
|
||||
set in the response. [RT #17301]
|
||||
|
||||
2289. [func] named-checkzone now reports the out-of-zone CNAME
|
||||
found. [RT #17309]
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: query.c,v 1.300 2008/01/02 23:47:01 tbox Exp $ */
|
||||
/* $Id: query.c,v 1.301 2008/01/09 04:09:12 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
@ -4442,6 +4442,7 @@ ns_query_start(ns_client_t *client) {
|
||||
dns_rdatatype_t qtype;
|
||||
unsigned int saved_extflags = client->extflags;
|
||||
unsigned int saved_flags = client->message->flags;
|
||||
isc_boolean_t want_ad;
|
||||
|
||||
CTRACE("ns_query_start");
|
||||
|
||||
@ -4586,6 +4587,15 @@ ns_query_start(ns_client_t *client) {
|
||||
if (message->flags & DNS_MESSAGEFLAG_CD)
|
||||
client->query.attributes &= ~NS_QUERYATTR_SECURE;
|
||||
|
||||
/*
|
||||
* Set 'want_ad' if the client has set AD in the query.
|
||||
* This allows AD to be returned on queries without DO set.
|
||||
*/
|
||||
if ((message->flags & DNS_MESSAGEFLAG_AD) != 0)
|
||||
want_ad = ISC_TRUE;
|
||||
else
|
||||
want_ad = ISC_FALSE;
|
||||
|
||||
/*
|
||||
* This is an ordinary query.
|
||||
*/
|
||||
@ -4605,7 +4615,7 @@ ns_query_start(ns_client_t *client) {
|
||||
* Set AD. We must clear it if we add non-validated data to a
|
||||
* response.
|
||||
*/
|
||||
if (WANTDNSSEC(client))
|
||||
if (WANTDNSSEC(client) || want_ad)
|
||||
message->flags |= DNS_MESSAGEFLAG_AD;
|
||||
|
||||
qclient = NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user