From: Tom Carpay Date: Mon, 15 Nov 2021 15:00:35 +0000 (+0000) Subject: Fix merge bugs X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f22e42f5545aa02d1929f4db763d97c54bfcc5bd;p=thirdparty%2Funbound.git Fix merge bugs --- diff --git a/daemon/worker.c b/daemon/worker.c index 5c05631ad..19463c047 100644 --- a/daemon/worker.c +++ b/daemon/worker.c @@ -503,7 +503,7 @@ answer_norec_from_cache(struct worker* worker, struct query_info* qinfo, case sec_status_indeterminate: EDNS_OPT_LIST_APPEND_EDE(&edns->opt_list_out, worker->scratchpad, LDNS_EDE_DNSSEC_INDETERMINATE, ""); - + /* fallthrough */ case sec_status_insecure: default: /* not secure */ @@ -1500,7 +1500,6 @@ worker_handle_request(struct comm_point* c, void* arg, int error, * ACLs allow the snooping. */ if(!(LDNS_RD_WIRE(sldns_buffer_begin(c->buffer))) && acl != acl_allow_snoop ) { - edns.opt_list = NULL; EDNS_OPT_LIST_APPEND_EDE(&edns.opt_list_out, worker->scratchpad, LDNS_EDE_NOT_AUTHORITATIVE, ""); error_encode(c->buffer, LDNS_RCODE_REFUSED, &qinfo, diff --git a/util/data/msgreply.h b/util/data/msgreply.h index 88e37f5b3..9a9a03870 100644 --- a/util/data/msgreply.h +++ b/util/data/msgreply.h @@ -543,15 +543,15 @@ int edns_opt_list_append(struct edns_option** list, uint16_t code, size_t len, * @param CODE: the EDE code. * @param TXT: Additional text for the option */ -#define EDNS_OPT_LIST_APPEND_EDE(LIST, REGION, CODE, TXT) \ +#define EDNS_OPT_LIST_APPEND_EDE(LIST, REGION, CODE, TXT) \ do { \ struct { \ uint16_t code; \ char text[sizeof(TXT) - 1]; \ } ede = { htons(CODE), TXT }; \ - edns_opt_list_append((LIST), (REGION), LDNS_EDNS_EDE, \ + edns_opt_list_append((LIST), LDNS_EDNS_EDE, \ sizeof(uint16_t) + sizeof(TXT) - 1, \ - (void *)&ede); \ + (void *)&ede, (REGION)); \ } while(0) /** @@ -562,7 +562,7 @@ int edns_opt_list_append(struct edns_option** list, uint16_t code, size_t len, * @param txt: Additional text for the option * @return false on failure. */ -int edns_opt_append_ede(struct edns_option* list, struct regional* region, +int edns_opt_list_append_ede(struct edns_option** list, struct regional* region, sldns_ede_code code, const char *txt); /**