]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Fix merge bugs
authorTom Carpay <tom@nlnetlabs.nl>
Mon, 15 Nov 2021 15:00:35 +0000 (15:00 +0000)
committerTom Carpay <tom@nlnetlabs.nl>
Mon, 15 Nov 2021 15:00:35 +0000 (15:00 +0000)
daemon/worker.c
util/data/msgreply.h

index 5c05631ad03fd1f02d245887dceb81ff4bafcd1d..19463c047c89f6323d69e0b68de80f5e89ac9577 100644 (file)
@@ -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,
index 88e37f5b38122e69336682f82a8a1452e4837a10..9a9a03870a946d744a517978b8fe270a2f6ea973 100644 (file)
@@ -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);
 
 /**