bind9/lib
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
..
bind9 add krb5-selfsub and ms-selfsub 2018-09-10 09:32:31 +10:00
dns Do not set qctx->result to DNS_R_SERVFAIL unless necessary 2018-10-08 12:47:28 +02:00
irs Drop ISC_PLATFORM_USEDECLSPEC and IRS_PLATFORM_USEDECLSPEC as they are platform dependent and only unix vs win32 platform.h header difference is enough 2018-09-07 12:17:30 +02:00
isc Remove HAVE_OPENSSL guard from openssl_shim.{c,h} and uncrustify it 2018-10-05 13:12:48 +02:00
isccc prep 9.13.3 2018-09-04 06:11:38 +00:00
isccfg extend DNSTAP to record UPDATE requests and responses as a separate type 2018-10-03 01:03:56 -07:00
ns Do not set qctx->result to DNS_R_SERVFAIL unless necessary 2018-10-08 12:47:28 +02:00
samples Add @OPENSSL_LIB@ to Windows project files as needed 2018-08-10 16:45:00 +02:00
win32/bindevt address win32 build issues 2018-05-22 16:32:21 -07:00
.gitignore added gitignore, removed cvsignore 2012-03-03 23:10:05 -08:00
Atffile [master] add libns and remove liblwres 2017-09-08 13:47:34 -07:00
Kyuafile regen master 2017-12-29 01:44:18 +00:00
Makefile.in remove lib/tests as nothing uses it anymore 2018-03-09 14:12:50 -08:00