+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]
* 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 */
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");
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.
*/
* 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;