From 67d77ba5a17560e236bf2bb15b4f581e519a78ff Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Mon, 10 Jul 2000 21:59:34 +0000 Subject: [PATCH] pullup: 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 84f3712697..39466a1bda 100644 --- a/bin/named/query.c +++ b/bin/named/query.c @@ -15,7 +15,7 @@ * SOFTWARE. */ -/* $Id: query.c,v 1.109.2.3 2000/07/10 19:39:04 explorer Exp $ */ +/* $Id: query.c,v 1.109.2.4 2000/07/10 21:59:34 gson Exp $ */ #include @@ -1841,7 +1841,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); @@ -2336,8 +2336,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;