]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
resolve: always update QNAME after zone cut update
authorMarek Vavruša <mvavrusa@cloudflare.com>
Sat, 24 Mar 2018 04:00:37 +0000 (21:00 -0700)
committerMarek Vavruša <mvavrusa@cloudflare.com>
Fri, 7 Sep 2018 17:45:21 +0000 (10:45 -0700)
Previously the code didn't update query if the minimization was turned off,
but that broke resolution for deep zones (like in-addr.arpa) when part of
the chain fell out of cache, and nearest zone cut was longer than
current query name. The condition is not necessary, since kr_make_query
already checks for query name minimisation flag.

lib/resolve.c

index 7e027d3a6f9123adcfbe329ae8ff2d6d7b252aab..d18a9284a4b1d64a1bd82606f2d24cbbcd51e4b3 100644 (file)
@@ -1319,8 +1319,8 @@ static int zone_cut_check(struct kr_request *request, struct kr_query *qry, knot
                }
        } while (state == KR_STATE_CONSUME);
 
-       /* Update minimized QNAME if zone cut changed */
-       if (qry->zone_cut.name && qry->zone_cut.name[0] != '\0' && !(qry->flags.NO_MINIMIZE)) {
+       /* Update QNAME if zone cut changed */
+       if (qry->zone_cut.name && qry->zone_cut.name[0] != '\0') {
                if (kr_make_query(qry, packet) != 0) {
                        return KR_STATE_FAIL;
                }