]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
copy transitive query flags when CNAME chasing
authorMarek Vavruša <mvavrusa@cloudflare.com>
Fri, 6 Apr 2018 20:25:21 +0000 (13:25 -0700)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Mon, 23 Apr 2018 15:49:34 +0000 (17:49 +0200)
This is an issue for things like disabling minimisation, which only works
for the original query and not for the CNAME target.

lib/layer/iterate.c

index f0823557cc4b04317b2267cdfdf08ab4bdf58586..4dad4d5ffbabeba778c7cb312c41e4186e439a43 100644 (file)
@@ -708,6 +708,13 @@ static int process_answer(knot_pkt_t *pkt, struct kr_request *req)
                        return KR_STATE_FAIL;
                }
                next->flags.AWAIT_CUT = true;
+
+               /* 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;
+
                if (query->flags.FORWARD) {
                        next->forward_flags.CNAME = true;
                        if (query->parent == NULL) {