From a9e6f6bc23e168c80bd920dfcd153a425422637c Mon Sep 17 00:00:00 2001 From: Tom Carpay Date: Tue, 17 Aug 2021 14:10:48 +0000 Subject: [PATCH] add variable bogus reason --- services/mesh.c | 2 +- util/data/msgreply.c | 1 + util/data/msgreply.h | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/services/mesh.c b/services/mesh.c index c0050bd25..95acec518 100644 --- a/services/mesh.c +++ b/services/mesh.c @@ -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, diff --git a/util/data/msgreply.c b/util/data/msgreply.c index 9e64b139b..4a8eb3df6 100644 --- a/util/data/msgreply.c +++ b/util/data/msgreply.c @@ -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) diff --git a/util/data/msgreply.h b/util/data/msgreply.h index 09f6997c3..1fbcbac45 100644 --- a/util/data/msgreply.h +++ b/util/data/msgreply.h @@ -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 -- 2.47.2