From ca93ad9b9e3ec6d56be77c87ea1a024354e04dc0 Mon Sep 17 00:00:00 2001 From: Brian Wellington Date: Thu, 6 Jul 2000 02:33:43 +0000 Subject: [PATCH] If we're asking for a key and need to call dns_view_findzonecut(), set the DNS_DB_NOEXACT flag. This means that the resolver will start look for the key at or above the parent zone, and will return the key set from the parent zone if key sets are present in both the parent and child. --- lib/dns/resolver.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index ae7d6182fd..abc3ef6f7a 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -15,7 +15,7 @@ * SOFTWARE. */ -/* $Id: resolver.c,v 1.142 2000/07/05 20:26:46 explorer Exp $ */ +/* $Id: resolver.c,v 1.143 2000/07/06 02:33:42 bwelling Exp $ */ #include @@ -1969,6 +1969,7 @@ fctx_create(dns_resolver_t *res, dns_name_t *name, dns_rdatatype_t type, isc_result_t iresult; isc_interval_t interval; dns_fixedname_t qdomain; + unsigned int findoptions = 0; /* * Caller must be holding the lock for bucket number 'bucketnum'. @@ -1992,10 +1993,12 @@ fctx_create(dns_resolver_t *res, dns_name_t *name, dns_rdatatype_t type, * nameservers, and we're not in forward-only mode, * so find the best nameservers to use. */ + if (type == dns_rdatatype_key) + findoptions |= DNS_DBFIND_NOEXACT; dns_fixedname_init(&qdomain); result = dns_view_findzonecut(res->view, name, dns_fixedname_name(&qdomain), 0, - 0, ISC_TRUE, + findoptions, ISC_TRUE, &fctx->nameservers, NULL); if (result != ISC_R_SUCCESS)