1. 08 Aug, 2018 12 commits
    • Ondřej Surý's avatar
    • Ondřej Surý's avatar
    • Ondřej Surý's avatar
    • Ondřej Surý's avatar
    • Ondřej Surý's avatar
      Check for C99 compatible compiler · 9e493798
      Ondřej Surý authored
    • Ondřej Surý's avatar
      Merge branch 'silence-openbsd-warning' into 'master' · e5ee96fc
      Ondřej Surý authored
      Silence a compiler warning on openbsd and fix windows build
      See merge request !603
    • Evan Hunt's avatar
    • Michał Kępień's avatar
      Merge branch '431-refactor-code-preparing-a-delegation-response' into 'master' · 20c52bf9
      Michał Kępień authored
      Refactor code preparing a delegation response
      Closes #431
      See merge request !549
    • Michał Kępień's avatar
      Add CHANGES entry · 1d9c3787
      Michał Kępień authored
      5006.	[cleanup]	Code preparing a delegation response was extracted from
      			query_delegation() and query_zone_delegation() into a
      			separate function in order to decrease code
      			duplication. [GL #431]
    • Michał Kępień's avatar
      Extract code preparing a delegation response to a separate function · 8e3fc572
      Michał Kępień authored
      Changes introduced by the previous two commits make the parts of
      query_delegation() and query_zone_delegation() which prepare a
      delegation response functionally equivalent.  Extract this code into a
      separate function, query_prepare_delegation_response(), and then call
      the latter from both query_delegation() and query_zone_delegation() in
      order to reduce code duplication.  Add a comment describing the purpose
      of the extracted code.  Fix coding style issues.
    • Michał Kępień's avatar
      Remove unused NS_QUERYATTR_CACHEGLUEOK query attribute · 7db4dedf
      Michał Kępień authored
      The NS_QUERYATTR_CACHEGLUEOK query attribute has no influence on query
      processing.  Remove it.
    • Michał Kępień's avatar
      Restore zone database and zone node if cache search results are to be ignored · b6c77202
      Michał Kępień authored
      When query processing hits a delegation from a locally configured zone,
      an attempt may be made to look for a better answer in the cache.  In
      such a case, the zone-sourced delegation data is set aside and the
      lookup is retried using the cache database.  When that lookup is
      completed, a decision is made whether the answer found in the cache is
      better than the answer found in the zone.
      Currently, if the zone-sourced answer turns out to be better than the
      one found in the cache:
        - qctx->zdb is not restored into qctx->db,
        - qctx->node, holding the zone database node found, is not even saved.
      Thus, in such a case both qctx->db and qctx->node will point at cache
      data.  This is not an issue for BIND versions which do not support
      mirror zones because in these versions non-recursive queries always
      cause the zone-sourced delegation to be returned and thus the
      non-recursive part of query_delegation() is never reached if the
      delegation is coming from a zone.  With mirror zones, however,
      non-recursive queries may cause cache lookups even after a zone
      delegation is found.  Leaving qctx->db assigned to the cache database
      when query_delegation() determines that the zone-sourced delegation is
      the best answer to the client's query prevents DS records from being
      added to delegations coming from mirror zones.  Fix this issue by
      keeping the zone database and zone node in qctx while the cache is
      searched for an answer and then restoring them into qctx->db and
      qctx->node, respectively, if the zone-sourced delegation turns out to be
      the best answer.  Since this change means that qctx->zdb cannot be used
      as the glue database any more as it will be reset to NULL by RESTORE(),
      ensure that qctx->db is not a cache database before attaching it to
      Furthermore, current code contains a conditional statement which
      prevents a mirror zone from being used as a source of glue records.
      Said statement was added to prevent assertion failures caused by
      attempting to use a zone database's glue cache for finding glue for an
      NS RRset coming from a cache database.  However, that check is overly
      strict since it completely prevents glue from being added to delegations
      coming from mirror zones.  With the changes described above in place,
      the scenario this check was preventing can no longer happen, so remove
      the aforementioned check.
      If qctx->zdb is not NULL, qctx->zfname will also not be NULL;
      qctx->zsigrdataset may be NULL in such a case, but query_putrdataset()
      handles pointers to NULL pointers gracefully.  Remove redundant
      conditional expressions to make the cleanup code in query_freedata()
      match the corresponding sequences of SAVE() / RESTORE() macros more
  2. 07 Aug, 2018 2 commits
  3. 06 Aug, 2018 5 commits
  4. 05 Aug, 2018 1 commit
  5. 02 Aug, 2018 20 commits