mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-08-17 21:25:50 +02:00
use correct edns_list attach function
This commit is contained in:
+6
-16
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user