]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Fix dont echo edns0 option list ...
authorTom Carpay <tom@nlnetlabs.nl>
Thu, 19 Aug 2021 14:28:26 +0000 (14:28 +0000)
committerTom Carpay <tom@nlnetlabs.nl>
Thu, 19 Aug 2021 14:28:26 +0000 (14:28 +0000)
when refusing to answer authoritatively.
Also remove TODO comments that were already done

daemon/worker.c

index 53f1e13734df15a74feee08a07de1b8f4a81231a..65c1c5d2b5337c7bcb06430634e9c5f4240996f8 100644 (file)
@@ -1408,16 +1408,9 @@ 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 ) {
-
-
-
-               // @TODO ADD Error Code 20 - Not Authoritative
-               // @TODO add EDNS record
-               
+               edns.opt_list = NULL;
                EDNS_OPT_APPEND_EDE(&edns, worker->scratchpad,
-                       LDNS_EDE_NOT_AUTHORITATIVE, "Not Authoritative");
-
-
+                       LDNS_EDE_NOT_AUTHORITATIVE, "");
                error_encode(c->buffer, LDNS_RCODE_REFUSED, &qinfo,
                        *(uint16_t*)(void *)sldns_buffer_begin(c->buffer),
                        sldns_buffer_read_u16_at(c->buffer, 2), &edns);