From f3e67683889aa4ba5838108b510d60126a705023 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Mon, 6 Feb 2017 15:41:16 +0100 Subject: [PATCH] QUERY_NO_CACHE: sync description and reality - The description was very misleading (far from reality). - The removed condition in rrcache was bogus. --- lib/layer/rrcache.c | 2 +- lib/rplan.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/layer/rrcache.c b/lib/layer/rrcache.c index ed483f184..34807d0d5 100644 --- a/lib/layer/rrcache.c +++ b/lib/layer/rrcache.c @@ -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(); diff --git a/lib/rplan.h b/lib/rplan.h index 00e234b26..d3bf90012 100644 --- a/lib/rplan.h +++ b/lib/rplan.h @@ -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, \ -- 2.47.2