From: Vladimír Čunát Date: Tue, 7 Apr 2020 08:25:05 +0000 (+0200) Subject: cache: avoid CNAMEs when QTYPE=DS X-Git-Tag: v5.1.0~8^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab40f1239627e6c78d6043cf63739f39daabc627;p=thirdparty%2Fknot-resolver.git cache: avoid CNAMEs when QTYPE=DS 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. --- diff --git a/lib/cache/peek.c b/lib/cache/peek.c index e015ffee9..16bfb9ff7 100644 --- a/lib/cache/peek.c +++ b/lib/cache/peek.c @@ -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. */