2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

Restore the RECURSIONOK attribute after staleonly

When doing a staleonly lookup we don't want to fallback to recursion.
After all, there are obviously problems with recursion, otherwise we
wouldn't do a staleonly lookup.

When resuming from recursion however, we should restore the
RECURSIONOK flag, allowing future required lookups for this client
to recurse.
This commit is contained in:
Matthijs Mekking
2021-03-26 15:18:01 +01:00
parent aaed7f9d8c
commit 3f81d79ffb

View File

@@ -6103,6 +6103,13 @@ fetch_callback(isc_task_t *task, isc_event_t *event) {
return;
}
/*
* We are resuming from recursion. Reset any attributes, options
* that a stale-only lookup may have set.
*/
if (client->view->cachedb != NULL && client->view->recursion) {
client->query.attributes |= NS_QUERYATTR_RECURSIONOK;
}
client->query.dboptions &= ~DNS_DBFIND_STALEONLY;
client->nodetach = false;