]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Reset DNS_FETCHOPT_TRYSTALE_ONTIMEOUT on resume
authorMatthijs Mekking <matthijs@isc.org>
Thu, 27 May 2021 13:54:13 +0000 (15:54 +0200)
committerEvan Hunt <each@isc.org>
Sun, 30 May 2021 07:03:51 +0000 (00:03 -0700)
Once we resume a query, we should clear DNS_FETCHOPT_TRYSTALE_ONTIMEOUT
from the options to prevent triggering the stale-answer-client-timeout
on subsequent fetches.

If we don't this may cause a crash when for example when prefetch is
triggered after a query restart.

lib/ns/query.c

index d3546f9d5cca7b8918fc3fd76e2bb24ed0981df0..97c3be1dd047c1f8ca9a54fe23a452eadbca65cb 100644 (file)
@@ -6118,6 +6118,7 @@ fetch_callback(isc_task_t *task, isc_event_t *event) {
        if (client->view->cachedb != NULL && client->view->recursion) {
                client->query.attributes |= NS_QUERYATTR_RECURSIONOK;
        }
+       client->query.fetchoptions &= ~DNS_FETCHOPT_TRYSTALE_ONTIMEOUT;
        client->query.dboptions &= ~DNS_DBFIND_STALETIMEOUT;
        client->nodetach = false;