From 51c9ea98a332bcd41185b07cf9ee9fba2af063a3 Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Fri, 10 Jul 2020 13:53:30 -0700 Subject: [PATCH] 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. --- lib/dns/resolver.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index 21f8d96e0e..df43b0a09a 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -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); } }