bind9/lib/ns
Michał Kępień ba91243542 Do not set qctx->result to DNS_R_SERVFAIL unless necessary
In some cases, setting qctx->result to DNS_R_SERVFAIL causes the value
of a 'result' variable containing a more specific failure reason to be
effectively discarded.  This may cause certain query error log messages
to lack specificity despite a more accurate problem cause being
determined during query processing.

In other cases, qctx->result is set to DNS_R_SERVFAIL even though a more
specific error (e.g. ISC_R_NOMEMORY) could be explicitly indicated.

Since the response message's RCODE is derived from qctx->result using
dns_result_torcode(), which handles a number of possible isc_result_t
values and returns SERVFAIL for anything not explicitly listed, it is
fine to set qctx->result to something more specific than DNS_R_SERVFAIL
(in fact, this is already being done in a few cases).  Modify most
QUERY_ERROR() calls so that qctx->result is set to a more specific error
code when possible.  Adjust query_error() so that statistics are still
calculated properly.  Remove the RECURSE_ERROR() macro which was
introduced exactly because qctx->result could be set to DNS_R_SERVFAIL
instead of DNS_R_DUPLICATE or DNS_R_DROP, which need special handling.
Modify dns_sdlz_putrr() so that it returns DNS_R_SERVFAIL when a DLZ
driver returns invalid RDATA, in order to prevent setting RCODE to
FORMERR (which is what dns_result_torcode() translates e.g. DNS_R_SYNTAX
to) while responding authoritatively.
2018-10-08 12:47:28 +02:00
..
include Remove the 'want_stale' field from struct query_ctx 2018-10-08 12:47:28 +02:00
tests rndc reconfig should not touch already loaded zones, some refactoring of dns_{zone,view,zt}_{async,}load 2018-08-28 17:04:45 +02:00
win32 Add @OPENSSL_LIB@ to Windows project files as needed 2018-08-10 16:45:00 +02:00
api prep 9.13.3 2018-09-04 06:11:38 +00:00
Atffile [master] add libns and remove liblwres 2017-09-08 13:47:34 -07:00
client.c extend DNSTAP to record UPDATE requests and responses as a separate type 2018-10-03 01:03:56 -07:00
hooks.h Replace custom isc_boolean_t with C standard bool type 2018-08-08 09:37:30 +02:00
interfacemgr.c We always want IPv6 2018-08-28 10:31:47 +02:00
Kyuafile regen master 2017-12-29 01:44:18 +00:00
lib.c Replace custom isc_boolean_t with C standard bool type 2018-08-08 09:37:30 +02:00
listenlist.c Replace custom isc_boolean_t with C standard bool type 2018-08-08 09:37:30 +02:00
log.c mismatch between defined log modules and ns_modules[] in lib/ns/log.c 2018-08-10 15:04:39 -04:00
Makefile.in Fix ax_check_openssl to accept yes and improve it to modern autotools standard 2018-07-23 22:10:52 +02:00
notify.c Replace custom isc_boolean_t with C standard bool type 2018-08-08 09:37:30 +02:00
query.c Do not set qctx->result to DNS_R_SERVFAIL unless necessary 2018-10-08 12:47:28 +02:00
server.c Refactor *_destroy and *_detach functions to unified order of actions. 2018-08-28 13:15:59 +02:00
sortlist.c remove the experimental authoritative ECS support from named 2018-05-25 08:21:25 -07:00
stats.c Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
update.c make update_log() work if zone is not set 2018-10-03 02:09:26 -04:00
version.c address win32 build issues 2018-05-22 16:32:21 -07:00
xfrout.c Replace custom isc_boolean_t with C standard bool type 2018-08-08 09:37:30 +02:00