]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
iterate.c: don't copy NO_MINIMIZE when following a CNAME
authorŠtěpán Balážik <stepan.balazik@nic.cz>
Tue, 19 Jan 2021 12:39:04 +0000 (13:39 +0100)
committerŠtěpán Balážik <stepan.balazik@nic.cz>
Mon, 25 Jan 2021 14:42:55 +0000 (15:42 +0100)
Instead copy it from the request's options.

Reasoning: Minimization might have been turned off as a workaround for
broken authoritative servers which doesn't support it. There is no
reason to drop minimization when switching zones when following a CNAME.

lib/layer/iterate.c

index 3eb233655bf81960973c2f7c9c5a1ff9d723ef09..668c0a64a35094011959ddbefa256aaa2b28aa69 100644 (file)
@@ -779,9 +779,11 @@ static int process_answer(knot_pkt_t *pkt, struct kr_request *req)
                /* Copy transitive flags from original query to CNAME followup. */
                next->flags.TRACE = query->flags.TRACE;
                next->flags.ALWAYS_CUT = query->flags.ALWAYS_CUT;
-               next->flags.NO_MINIMIZE = query->flags.NO_MINIMIZE;
                next->flags.NO_THROTTLE = query->flags.NO_THROTTLE;
 
+               /* Original query might have turned minimization off, revert. */
+               next->flags.NO_MINIMIZE = req->options.NO_MINIMIZE;
+
                if (query->flags.FORWARD) {
                        next->forward_flags.CNAME = true;
                }