From: Marek VavruĊĦa Date: Mon, 29 Dec 2014 02:40:57 +0000 (+0100) Subject: cache: handle time skip / cache fetch on newer queries X-Git-Tag: v1.0.0-beta1~394 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=264859a5d0dcf11daaa41e35c4875681861d4d37;p=thirdparty%2Fknot-resolver.git cache: handle time skip / cache fetch on newer queries --- diff --git a/lib/cache.c b/lib/cache.c index 32811ee34..5e862a989 100644 --- a/lib/cache.c +++ b/lib/cache.c @@ -89,7 +89,7 @@ int kr_cache_query(namedb_txn_t *txn, knot_rrset_t *rr, uint32_t *timestamp) rr->rrs.data = found_rr->data; /* No time constraint */ - if (timestamp == NULL) { + if (timestamp == NULL || *timestamp < found_rr->timestamp) { return KNOT_EOK; }