mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-01-16 03:32:54 -05:00
use correct edns_list attach function
This commit is contained in:
parent
dcfcde2ec8
commit
d731fa2e21
1 changed files with 6 additions and 16 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue