From baeb4bcf32d035af33ab6da48e16f012b0c4a76d Mon Sep 17 00:00:00 2001 From: Brian Wellington Date: Thu, 6 Jul 2000 02:27:26 +0000 Subject: [PATCH] In query_find(), if we're looking up a key and dns_db_find() returns DNS_R_DELEGATION, don't use the domain & ns set found by dns_db_find(). This means that a recursive server will not immediately ask the child zone for a key set at the apex; the resolver will determine who to ask. --- bin/named/query.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/bin/named/query.c b/bin/named/query.c index fb2f41de0d..a0e3b288d8 100644 --- a/bin/named/query.c +++ b/bin/named/query.c @@ -15,7 +15,7 @@ * SOFTWARE. */ -/* $Id: query.c,v 1.112 2000/07/05 23:10:06 gson Exp $ */ +/* $Id: query.c,v 1.113 2000/07/06 02:27:26 bwelling Exp $ */ #include @@ -1839,7 +1839,7 @@ query_recurse(ns_client_t *client, dns_rdatatype_t qtype, dns_name_t *qdomain, /* * Invoke the resolver. */ - REQUIRE(nameservers->type == dns_rdatatype_ns); + REQUIRE(nameservers == NULL || nameservers->type == dns_rdatatype_ns); REQUIRE(client->query.fetch == NULL); rdataset = query_newrdataset(client); @@ -2334,8 +2334,12 @@ query_find(ns_client_t *client, dns_fetchevent_t *event) { /* * Recurse! */ - result = query_recurse(client, qtype, fname, - rdataset); + if (type == dns_rdatatype_key) + result = query_recurse(client, qtype, + NULL, NULL); + else + result = query_recurse(client, qtype, + fname, rdataset); if (result == ISC_R_SUCCESS) client->query.attributes |= NS_QUERYATTR_RECURSING;