From: Štěpán Balážik Date: Tue, 19 Jan 2021 12:39:04 +0000 (+0100) Subject: iterate.c: don't copy NO_MINIMIZE when following a CNAME X-Git-Tag: v5.3.0~15^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8db64ae2b508de97e702fdc1a00afb047146c37c;p=thirdparty%2Fknot-resolver.git 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. --- 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; }