2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 13:38:26 +00:00

permanently disable QNAME minimization in a fetch when forwarding

QNAME minimization is normally disabled when forwarding. if, in the
course of processing a fetch, we switch back to normal recursion at
some point, we can't safely start minimizing because we may have
been left in an inconsistent state.
This commit is contained in:
Evan Hunt 2020-07-10 13:53:30 -07:00 committed by Michał Kępień
parent c6a08a727d
commit 51c9ea98a3

View File

@ -4013,6 +4013,15 @@ fctx_nextaddress(fetchctx_t *fctx) {
addrinfo->flags |= FCTX_ADDRINFO_MARK;
fctx->find = NULL;
fctx->forwarding = true;
/*
* QNAME minimization is disabled when
* forwarding, and has to remain disabled if
* we switch back to normal recursion; otherwise
* forwarding could leave us in an inconsistent
* state.
*/
fctx->minimized = false;
return (addrinfo);
}
}