From 949162ca40a79ca5afcaeb14794c12b774386098 Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Thu, 11 May 2000 20:10:34 +0000 Subject: [PATCH] in [84], after allowing access to a zone based on the view allow-query ACL, subsequent accesses to the same zone were denied because dbversion->queryok was not being set. This caused mandatory glue to be omitted from referral responses, ultimately causing lookups to fail if all authoritative servers for the parent zone were running bind9. --- bin/named/query.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/bin/named/query.c b/bin/named/query.c index e702e432da..de0dc1bb89 100644 --- a/bin/named/query.c +++ b/bin/named/query.c @@ -534,19 +534,17 @@ query_getdb(ns_client_t *client, dns_name_t *name, unsigned int options, * the NS_QUERYATTR_QUERYOK attribute is now valid. */ client->query.attributes |= NS_QUERYATTR_QUERYOKVALID; - } else { - /* - * Remember the result of the ACL check so we - * don't have to check again. - */ - if (result == ISC_R_SUCCESS) - dbversion->queryok = ISC_TRUE; - else - dbversion->queryok = ISC_FALSE; - } + } } else result = ISC_R_SUCCESS; + /* + * Remember the result of the ACL check so we + * don't have to check again. + */ + if (dbversion != NULL && result == ISC_R_SUCCESS) + dbversion->queryok = ISC_TRUE; + return (result); }