mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 13:38:26 +00:00
423. [bug] When responding to a recusive query, errors that occur
after following a CNAME should cause the query to fail. [RT #274]
This commit is contained in:
parent
0a04ba7b7b
commit
1fc26319b5
4
CHANGES
4
CHANGES
@ -1,4 +1,8 @@
|
|||||||
|
|
||||||
|
423. [bug] When responding to a recusive query, errors that occur
|
||||||
|
after following a CNAME should cause the query to fail.
|
||||||
|
[RT #274]
|
||||||
|
|
||||||
422. [func] get rid of isc_random_t, and make isc_random_get()
|
422. [func] get rid of isc_random_t, and make isc_random_get()
|
||||||
and isc_random_jitter() use rand() internally
|
and isc_random_jitter() use rand() internally
|
||||||
instead of local state. Note that isc_random_*()
|
instead of local state. Note that isc_random_*()
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: query.c,v 1.127 2000/08/26 23:22:36 explorer Exp $ */
|
/* $Id: query.c,v 1.128 2000/09/06 18:41:22 gson Exp $ */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
@ -53,6 +53,8 @@
|
|||||||
NS_QUERYATTR_RECURSING) != 0)
|
NS_QUERYATTR_RECURSING) != 0)
|
||||||
#define CACHEGLUEOK(c) (((c)->query.attributes & \
|
#define CACHEGLUEOK(c) (((c)->query.attributes & \
|
||||||
NS_QUERYATTR_CACHEGLUEOK) != 0)
|
NS_QUERYATTR_CACHEGLUEOK) != 0)
|
||||||
|
#define WANTRECURSION(c) (((c)->query.attributes & \
|
||||||
|
NS_QUERYATTR_WANTRECURSION) != 0)
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
#define CTRACE(m) isc_log_write(ns_g_lctx, \
|
#define CTRACE(m) isc_log_write(ns_g_lctx, \
|
||||||
@ -2885,9 +2887,15 @@ query_find(ns_client_t *client, dns_fetchevent_t *event) {
|
|||||||
goto restart;
|
goto restart;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eresult != ISC_R_SUCCESS && !PARTIALANSWER(client)) {
|
if (eresult != ISC_R_SUCCESS &&
|
||||||
ns_client_error(client, eresult);
|
(!PARTIALANSWER(client) || WANTRECURSION(client))) {
|
||||||
ns_client_detach(&client);
|
/*
|
||||||
|
* If we don't have any answer to give the client,
|
||||||
|
* or if the client requested recursion and thus wanted
|
||||||
|
* the complete answer, send an error response.
|
||||||
|
*/
|
||||||
|
ns_client_error(client, eresult);
|
||||||
|
ns_client_detach(&client);
|
||||||
} else if (!RECURSING(client)) {
|
} else if (!RECURSING(client)) {
|
||||||
/*
|
/*
|
||||||
* We are done. Make a final tweak to the AA bit if the
|
* We are done. Make a final tweak to the AA bit if the
|
||||||
@ -2952,6 +2960,9 @@ ns_query_start(ns_client_t *client) {
|
|||||||
*/
|
*/
|
||||||
client->next = query_next;
|
client->next = query_next;
|
||||||
|
|
||||||
|
if ((message->flags & DNS_MESSAGEFLAG_RD) != 0)
|
||||||
|
client->query.attributes |= NS_QUERYATTR_WANTRECURSION;
|
||||||
|
|
||||||
if ((client->view->cachedb == NULL)
|
if ((client->view->cachedb == NULL)
|
||||||
|| (!client->view->additionalfromcache)) {
|
|| (!client->view->additionalfromcache)) {
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user