From f882ab1ac25f94c75f006ed167d1845fc5ca2966 Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Fri, 10 Dec 1999 21:19:40 +0000 Subject: [PATCH] obey the "auth-nxdomain" config option (but the default is now "no" --- bin/named/query.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/bin/named/query.c b/bin/named/query.c index c141039f94..67a624e7c5 100644 --- a/bin/named/query.c +++ b/bin/named/query.c @@ -2472,8 +2472,22 @@ query_find(ns_client_t *client, dns_fetchevent_t *event) { if (eresult != ISC_R_SUCCESS && !PARTIALANSWER(client)) ns_client_error(client, eresult); - else if (!RECURSING(client)) + else if (!RECURSING(client)) { + /* + * We are done. Make a final tweak to the AA bit if the + * auth-nxdomain config option says so, then send the + * response. + */ + if (client->message->rcode == dns_rcode_nxdomain) { + /* Note: default was "true" in BIND 8. */ + isc_boolean_t auth_nxdomain = ISC_FALSE; + (void) dns_c_ctx_getauth_nx_domain(ns_g_confctx, + &auth_nxdomain); + if (auth_nxdomain == ISC_TRUE) + client->message->flags |= DNS_MESSAGEFLAG_AA; + } ns_client_send(client); + } } /*