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.
This commit is contained in:
Andreas Gustafsson
2000-07-10 21:59:34 +00:00
parent 0426cfb945
commit 67d77ba5a1
+8 -4
View File
@@ -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 <config.h>
@@ -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;