]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
add variable bogus reason
authorTom Carpay <tom@nlnetlabs.nl>
Tue, 17 Aug 2021 14:10:48 +0000 (14:10 +0000)
committerTom Carpay <tom@nlnetlabs.nl>
Tue, 17 Aug 2021 14:10:48 +0000 (14:10 +0000)
services/mesh.c
util/data/msgreply.c
util/data/msgreply.h

index c0050bd25251a84e660533c15467e8ecb578f17c..95acec518eb4b2f6f06290547ca96cb86f3e4dd8 100644 (file)
@@ -1282,7 +1282,7 @@ mesh_send_reply(struct mesh_state* m, int rcode, struct reply_info* rep,
                                     ? errinf_to_str_bogus(&m->s) : NULL;
 
                        edns_opt_append_ede(&r->edns, m->s.region,
-                                       LDNS_EDE_DNSSEC_BOGUS, reason);
+                                       rep->reason_bogus, reason);
                        free(reason);
                }
                error_encode(r_buffer, rcode, &m->s.qinfo, r->qid,
index 9e64b139b226c4de7eea44c4250245ec698e0657..4a8eb3df61731af476c4f8a4aabad79fbbca7b1f 100644 (file)
@@ -117,6 +117,7 @@ construct_reply_info_base(struct regional* region, uint16_t flags, size_t qd,
        rep->ar_numrrsets = ar;
        rep->rrset_count = total;
        rep->security = sec;
+       rep->reason_bogus = LDNS_EDE_DNSSEC_BOGUS;
        rep->authoritative = 0;
        /* array starts after the refs */
        if(region)
index 09f6997c3756120740e63febab58adf6f191a0a1..1fbcbac45e040b6f6c65839f29afb4cb3abaf345 100644 (file)
@@ -168,6 +168,11 @@ struct reply_info {
         */
        enum sec_status security;
 
+       /**
+        * EDE (rfc8914) code with reason for DNSSEC bogus status.
+        */
+       sldns_ede_code reason_bogus;
+
        /**
         * Number of RRsets in each section.
         * The answer section. Add up the RRs in every RRset to calculate