]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
rrcache: always stash authority records
authorVladimír Čunát <vladimir.cunat@nic.cz>
Mon, 24 Apr 2017 17:07:18 +0000 (19:07 +0200)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Mon, 24 Apr 2017 17:32:00 +0000 (19:32 +0200)
It's up to iterator to pick the interesting cases to auth_selected.

lib/layer/rrcache.c

index dccd01a5e4016a435affcd8f61b6e456861ff7ce..b1d90695296cc9d9099a82196d7a1a6b5ac5cc2a 100644 (file)
@@ -415,10 +415,7 @@ static int rrcache_stash(kr_layer_t *ctx, knot_pkt_t *pkt)
        if (is_auth) {
                ret = stash_selected(req, pkt, &stash, false, &req->pool);
        }
-       const bool want_authority = is_auth
-               || knot_pkt_section(pkt, KNOT_ANSWER)->count == 0 /* referral */
-               || qry->flags & QUERY_CNAME;
-       if (ret == 0 && want_authority) {
+       if (ret == 0) {
                ret = stash_selected(req, pkt, &stash, true, &req->pool);
                /* this also stashes DS records in referrals */
        }