use correct edns_list attach function

This commit is contained in:
TCY16 2022-09-21 16:19:38 +02:00
parent dcfcde2ec8
commit d731fa2e21

View file

@ -486,16 +486,11 @@ answer_norec_from_cache(struct worker* worker, struct query_info* qinfo,
return 0;
/* Attached the cached EDE (RFC8914) */
if (worker->env.cfg->ede) {
size_t reason_bogus_str_len = 0;
char* reason_bogus_str = msg->rep->reason_bogus_str;
if (reason_bogus_str) {
reason_bogus_str_len = strlen(reason_bogus_str);
}
edns_opt_list_append(&edns->opt_list_out,
msg->rep->reason_bogus, reason_bogus_str_len,
reason_bogus_str, worker->scratchpad);
edns_opt_list_append_ede(&edns->opt_list_out,
worker->scratchpad, msg->rep->reason_bogus,
reason_bogus_str);
}
error_encode(repinfo->c->buffer, LDNS_RCODE_SERVFAIL,
&msg->qinfo, id, flags, edns);
@ -669,16 +664,11 @@ answer_from_cache(struct worker* worker, struct query_info* qinfo,
goto bail_out;
/* Attached the cached EDE (RFC8914) */
if (worker->env.cfg->ede) {
size_t reason_bogus_str_len = 0;
char* reason_bogus_str = rep->reason_bogus_str;
if (reason_bogus_str) {
reason_bogus_str_len = strlen(reason_bogus_str);
}
edns_opt_list_append(&edns->opt_list_out,
rep->reason_bogus, reason_bogus_str_len,
reason_bogus_str, worker->scratchpad);
edns_opt_list_append_ede(&edns->opt_list_out,
worker->scratchpad, rep->reason_bogus,
reason_bogus_str);
}
error_encode(repinfo->c->buffer, LDNS_RCODE_SERVFAIL,
qinfo, id, flags, edns);