Commit 2678fccd authored by Mark Andrews's avatar Mark Andrews
Browse files

2290. [bug] Let AD in the query signal that the client wants AD

                        set in the response. [RT #17301]
parent 56246046
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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment