From 8db64ae2b508de97e702fdc1a00afb047146c37c Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C5=A0t=C4=9Bp=C3=A1n=20Bal=C3=A1=C5=BEik?= Date: Tue, 19 Jan 2021 13:39:04 +0100 Subject: [PATCH] iterate.c: don't copy NO_MINIMIZE when following a CNAME 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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/layer/iterate.c b/lib/layer/iterate.c index 3eb233655..668c0a64a 100644 --- a/lib/layer/iterate.c +++ b/lib/layer/iterate.c @@ -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; } -- 2.47.2