]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
compatible changes around kr_request::answer
authorVladimír Čunát <vladimir.cunat@nic.cz>
Wed, 11 Sep 2019 15:22:59 +0000 (17:22 +0200)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Wed, 21 Oct 2020 10:26:50 +0000 (12:26 +0200)
lib/resolve.c
lib/rplan.h
modules/dns64/dns64.lua

index fb53b61988ab4845dc7227ceb0678baf6003a00c..44fbef5889cb5b8af69c6354bb7267b0ac8b872a 100644 (file)
@@ -420,7 +420,7 @@ static int edns_erase_and_reserve(knot_pkt_t *pkt)
        return knot_pkt_reserve(pkt, len);
 }
 
-static int edns_create(knot_pkt_t *pkt, knot_pkt_t *template, struct kr_request *req)
+static int edns_create(knot_pkt_t *pkt, const struct kr_request *req)
 {
        pkt->opt_rr = knot_rrset_copy(req->ctx->upstream_opt_rr, &pkt->mm);
        size_t wire_size = knot_edns_wire_size(pkt->opt_rr);
@@ -704,7 +704,7 @@ static int query_finalize(struct kr_request *request, struct kr_query *qry, knot
        /* Remove any EDNS records from any previous iteration. */
        int ret = edns_erase_and_reserve(pkt);
        if (ret) return ret;
-       ret = edns_create(pkt, request->answer, request);
+       ret = edns_create(pkt, request);
        if (ret) return ret;
        if (qry->flags.STUB) {
                /* Stub resolution (ask for +rd and +do) */
index 7575ecd5b11c9e6f810599529ec888537647d524..e69a3f86c689990b87d582913864c68dd6e07b10 100644 (file)
@@ -30,7 +30,7 @@ struct kr_qflags {
        bool EXPIRING : 1;       /**< Query response is cached, but expiring. */
        bool ALLOW_LOCAL : 1;    /**< Allow queries to local or private address ranges. */
        bool DNSSEC_WANT : 1;    /**< Want DNSSEC secured answer; exception: +cd,
-                                 * i.e. knot_wire_set_cd(request->answer->wire). */
+                                 * i.e. knot_wire_get_cd(request->qsource.packet->wire) */
        bool DNSSEC_BOGUS : 1;   /**< Query response is DNSSEC bogus. */
        bool DNSSEC_INSECURE : 1;/**< Query response is DNSSEC insecure. */
        bool DNSSEC_CD : 1;      /**< Instruction to set CD bit in request. */
index 0628a504037ea8244220b5d5a6163cca700cb739..a389b7837276b4af37d03f7b4e6435081f045075 100644 (file)
@@ -31,7 +31,7 @@ function M.layer.consume(state, req, pkt)
        local qry = req:current()
        -- Observe only final answers in IN class where request has no CD flag.
        if M.proxy == nil or not qry.flags.RESOLVED
-                       or pkt:qclass() ~= kres.class.IN or req.answer:cd() then
+                       or pkt:qclass() ~= kres.class.IN or req.qsource.packet:cd() then
                return state
        end
        -- Synthetic AAAA from marked A responses