bind9/lib/ns/include
Matthijs Mekking fcf8fb4f39 Keep track of allow client detach
The stale-answer-client-timeout feature introduced a dependancy on
when a client may be detached from the handle. The dboption
DNS_DBFIND_STALEONLY was reused to track this attribute. This overloads
the meaning of this database option, and actually introduced a bug
because the option was checked in other places. In particular, in
'ns_query_done()' there is a check for 'RECURSING(qctx->client) &&
(!QUERY_STALEONLY(&qctx->client->query) || ...' and the condition is
satisfied because recursion has not completed yet and
DNS_DBFIND_STALEONLY is already cleared by that time (in
query_lookup()), because we found a useful answer and we should detach
the client from the handle after sending the response.

Add a new boolean to the client structure to keep track of client
detach from handle is allowed or not. It is only disallowed if we are
in a staleonly lookup and we didn't found a useful answer.

(cherry picked from commit fee164243f)
2021-04-02 13:27:43 +02:00
..
ns Keep track of allow client detach 2021-04-02 13:27:43 +02:00
.clang-format Merge branch '46-enforce-clang-format-rules' into 'master' 2020-02-14 08:45:59 +00:00
Makefile.in Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00