]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
cache: handle time skip / cache fetch on newer queries
authorMarek Vavruša <marek.vavrusa@nic.cz>
Mon, 29 Dec 2014 02:40:57 +0000 (03:40 +0100)
committerMarek Vavruša <marek.vavrusa@nic.cz>
Mon, 29 Dec 2014 02:40:57 +0000 (03:40 +0100)
lib/cache.c

index 32811ee3454644fdce1888849feded56a348fd37..5e862a989b4c912441b547e2791bb269485e53b8 100644 (file)
@@ -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;
                }