]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
lib/resolve: clear ‘cached’ flag on requery
authorMarek Vavruša <marek.vavrusa@nic.cz>
Tue, 12 May 2015 22:03:41 +0000 (00:03 +0200)
committerMarek Vavruša <marek.vavrusa@nic.cz>
Tue, 12 May 2015 22:03:41 +0000 (00:03 +0200)
if the flag is left on, it prevents further caching

lib/resolve.c

index 23d4744408cb142e77b279ae83c521066e04738b..92cee2d76529652599c0c5e2824469fe00075a6c 100644 (file)
@@ -347,6 +347,8 @@ int kr_resolve_consume(struct kr_request *request, knot_pkt_t *packet)
        /* Pop query if resolved. */
        if (qry->flags & QUERY_RESOLVED) {
                kr_rplan_pop(rplan, qry);
+       } else { /* Clear query flags for next attempt */
+               qry->flags &= ~QUERY_CACHED;
        }
 
        knot_overlay_reset(&request->overlay);