From: Brian Wellington Date: Tue, 25 Jul 2000 21:37:05 +0000 (+0000) Subject: Add a 'fetchoptions' field to the query structure, which is currently 0 X-Git-Tag: v9.2.0a1^10~26 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=1702f1a0fec50e754a033cf3271676373c6b4c15;p=thirdparty%2Fbind9.git Add a 'fetchoptions' field to the query structure, which is currently 0 unless the query has the cd bit set. --- diff --git a/bin/named/include/named/query.h b/bin/named/include/named/query.h index a67121032a3..f0d7b9c71ca 100644 --- a/bin/named/include/named/query.h +++ b/bin/named/include/named/query.h @@ -15,7 +15,7 @@ * SOFTWARE. */ -/* $Id: query.h,v 1.17 2000/06/22 21:49:50 tale Exp $ */ +/* $Id: query.h,v 1.18 2000/07/25 21:37:05 bwelling Exp $ */ #ifndef NAMED_QUERY_H #define NAMED_QUERY_H 1 @@ -42,6 +42,7 @@ struct ns_query { dns_name_t * origqname; dns_rdataset_t * qrdataset; unsigned int dboptions; + unsigned int fetchoptions; dns_db_t * gluedb; dns_fetch_t * fetch; dns_a6context_t a6ctx; diff --git a/bin/named/query.c b/bin/named/query.c index be0a5262fcd..8a0a00d9c1d 100644 --- a/bin/named/query.c +++ b/bin/named/query.c @@ -15,7 +15,7 @@ * SOFTWARE. */ -/* $Id: query.c,v 1.116 2000/07/25 01:06:18 bwelling Exp $ */ +/* $Id: query.c,v 1.117 2000/07/25 21:37:03 bwelling Exp $ */ #include @@ -169,6 +169,7 @@ query_reset(ns_client_t *client, isc_boolean_t everything) { client->query.qname = NULL; client->query.qrdataset = NULL; client->query.dboptions = 0; + client->query.fetchoptions = 0; client->query.gluedb = NULL; } @@ -1818,7 +1819,6 @@ query_recurse(ns_client_t *client, dns_rdatatype_t qtype, dns_name_t *qdomain, { isc_result_t result; dns_rdataset_t *rdataset, *sigrdataset; - unsigned int options = 0; /* * We are about to recurse, which means that this client will @@ -1860,7 +1860,8 @@ query_recurse(ns_client_t *client, dns_rdatatype_t qtype, dns_name_t *qdomain, result = dns_resolver_createfetch(client->view->resolver, client->query.qname, qtype, qdomain, nameservers, - NULL, options, client->task, + NULL, client->query.fetchoptions, + client->task, query_resume, client, rdataset, sigrdataset, &client->query.fetch); @@ -2957,10 +2958,13 @@ ns_query_start(ns_client_t *client) { /* * If the client has requested that DNSSEC checking be disabled, - * allow lookups to return pending data. + * allow lookups to return pending data and instruct the resolver + * to return data before validation has completed. */ - if (message->flags & DNS_MESSAGEFLAG_CD) + if (message->flags & DNS_MESSAGEFLAG_CD) { client->query.dboptions |= DNS_DBFIND_PENDINGOK; + client->query.fetchoptions |= DNS_FETCHOPT_NOVALIDATE; + } /* * This is an ordinary query.