1. 18 Oct, 2018 1 commit
  2. 12 Oct, 2018 2 commits
  3. 08 Oct, 2018 5 commits
    • Michał Kępień's avatar
      Merge branch '572-improve-accuracy-of-query-error-logging' into 'master' · a9e1517a
      Michał Kępień authored
      Improve accuracy of query error logging
      Closes #572
      See merge request !837
    • Michał Kępień's avatar
      Add CHANGES entry · dc531dc3
      Michał Kępień authored
      5047.	[bug]		Messages logged for certain query processing failures
      			now include a more specific error description if it is
      			available. [GL #572]
    • Michał Kępień's avatar
      Do not set qctx->result to DNS_R_SERVFAIL unless necessary · ba912435
      Michał Kępień authored
      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.
    • Michał Kępień's avatar
      Remove the 'want_stale' field from struct query_ctx · b3cd868c
      Michał Kępień authored
      As the previous commit makes the 'want_stale' field of struct query_ctx
      redundant, remove it.
    • Michał Kępień's avatar
      Set up stale response lookup before query_done() is called · cb48d410
      Michał Kępień authored
      When something goes wrong while recursing for an answer to a query,
      query_gotanswer() sets a flag (qctx->want_stale) in the query context.
      query_done() is subsequently called and it can either set up a stale
      response lookup (if serve-stale is enabled) or conclude that a SERVFAIL
      response should be sent.  This may cause confusion when looking at query
      error logs since the QUERY_ERROR() line responsible for setting the
      response's RCODE to SERVFAIL is not in a catch-all branch of a switch
      statement inside query_gotanswer() (like it is for authoritative
      responses) but rather in a code branch which appears to have something
      to do with serve-stale, even when the latter is not enabled.
      Extract the part of query_done() responsible for checking serve-stale
      configuration and optionally setting up a stale response lookup into a
      separate function, query_usestale(), shifting the responsibility for
      setting the response's RCODE to SERVFAIL to the same QUERY_ERROR() line
      in query_gotanswer() which is evaluated for authoritative responses.
  4. 05 Oct, 2018 24 commits
  5. 04 Oct, 2018 8 commits