]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
QUERY_NO_CACHE: sync description and reality
authorVladimír Čunát <vladimir.cunat@nic.cz>
Mon, 6 Feb 2017 14:41:16 +0000 (15:41 +0100)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Thu, 9 Feb 2017 16:42:32 +0000 (17:42 +0100)
- The description was very misleading (far from reality).
- The removed condition in rrcache was bogus.

lib/layer/rrcache.c
lib/rplan.h

index ed483f184cfbd2f2919e8d65345665aa5a1c046f..34807d0d5293bf6354fa0d915355b69812af34f1 100644 (file)
@@ -213,7 +213,7 @@ static int commit_rr(const char *key, void *val, void *data)
                return commit_rrsig(baton, rank, KR_CACHE_FLAG_NONE, rr);
        }
        /* Accept only better rank (if not overriding) */
-       if (!(rank & KR_RANK_SECURE) && !(baton->qry->flags & QUERY_NO_CACHE)) {
+       if (!(rank & KR_RANK_SECURE)) {
                int cached_rank = kr_cache_peek_rank(baton->cache, KR_CACHE_RR, rr->owner, rr->type, baton->timestamp);
                if (cached_rank >= rank) {
                        return kr_ok();
index 00e234b26169ba44a9aa133ffdd86ede0c1faf6f..d3bf90012fbf377f3aaeaaf0e620a6821ec95c1e 100644 (file)
@@ -36,7 +36,7 @@
        X(AWAIT_CUT,       1 << 8) /**< Query is waiting for zone cut lookup */ \
        X(SAFEMODE,        1 << 9) /**< Don't use fancy stuff (EDNS...) */ \
        X(CACHED,          1 << 10) /**< Query response is cached. */ \
-       X(NO_CACHE,        1 << 11) /**< Do not use expiring cache for lookup. */ \
+       X(NO_CACHE,        1 << 11) /**< No cache for lookup; exception: finding NSs and subqueries. */ \
        X(EXPIRING,        1 << 12) /**< Query response is cached, but expiring. */ \
        X(ALLOW_LOCAL,     1 << 13) /**< Allow queries to local or private address ranges. */ \
        X(DNSSEC_WANT,     1 << 14) /**< Want DNSSEC secured answer; exception: +cd, \