]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
cache: avoid CNAMEs when QTYPE=DS
authorVladimír Čunát <vladimir.cunat@nic.cz>
Tue, 7 Apr 2020 08:25:05 +0000 (10:25 +0200)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Wed, 22 Apr 2020 06:58:40 +0000 (08:58 +0200)
It's disallowed combination, but why not fix it when it's so easy.

This was exposed by some of the previous two commits (not sure why)
in CI test for kresd->kresd forwarding.

lib/cache/peek.c

index e015ffee9b8924086695dad53dc880f530cb04ee..16bfb9ff787e05ca235246b96c97cd50dcafffb1 100644 (file)
@@ -655,7 +655,7 @@ static int check_NS_entry(struct key *k, const knot_db_val_t entry, const int i,
        const int ESKIP = ABS(ENOENT);
        if (!entry.len
                /* On a zone cut we want DS from the parent zone. */
-               || (i <= EL_NS && exact_match && is_DS)
+               || (exact_match && is_DS)
                /* CNAME is interesting only if we
                 * directly hit the name that was asked.
                 * Note that we want it even in the DS case. */