mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
- Move a cache reply callback in worker.c closer to the cache reply
generation.
This commit is contained in:
parent
2cc9563cf8
commit
d4145772b5
2 changed files with 8 additions and 4 deletions
|
|
@ -742,10 +742,6 @@ answer_from_cache(struct worker* worker, struct query_info* qinfo,
|
||||||
edns->udp_size = EDNS_ADVERTISED_SIZE;
|
edns->udp_size = EDNS_ADVERTISED_SIZE;
|
||||||
edns->ext_rcode = 0;
|
edns->ext_rcode = 0;
|
||||||
edns->bits &= EDNS_DO;
|
edns->bits &= EDNS_DO;
|
||||||
if(!inplace_cb_reply_cache_call(&worker->env, qinfo, NULL, rep,
|
|
||||||
(int)(flags&LDNS_RCODE_MASK), edns, repinfo, worker->scratchpad,
|
|
||||||
worker->env.now_tv))
|
|
||||||
goto bail_out;
|
|
||||||
*alias_rrset = NULL; /* avoid confusion if caller set it to non-NULL */
|
*alias_rrset = NULL; /* avoid confusion if caller set it to non-NULL */
|
||||||
if((worker->daemon->use_response_ip || worker->daemon->use_rpz) &&
|
if((worker->daemon->use_response_ip || worker->daemon->use_rpz) &&
|
||||||
!partial_rep && !apply_respip_action(worker, qinfo, cinfo, rep,
|
!partial_rep && !apply_respip_action(worker, qinfo, cinfo, rep,
|
||||||
|
|
@ -789,6 +785,10 @@ answer_from_cache(struct worker* worker, struct query_info* qinfo,
|
||||||
worker->scratchpad, encode_rep->reason_bogus,
|
worker->scratchpad, encode_rep->reason_bogus,
|
||||||
encode_rep->reason_bogus_str);
|
encode_rep->reason_bogus_str);
|
||||||
}
|
}
|
||||||
|
if(!inplace_cb_reply_cache_call(&worker->env, qinfo, NULL, encode_rep,
|
||||||
|
(int)(flags&LDNS_RCODE_MASK), edns, repinfo, worker->scratchpad,
|
||||||
|
worker->env.now_tv))
|
||||||
|
goto bail_out;
|
||||||
if(!reply_info_answer_encode(qinfo, encode_rep, id, flags,
|
if(!reply_info_answer_encode(qinfo, encode_rep, id, flags,
|
||||||
repinfo->c->buffer, timenow, 1, worker->scratchpad,
|
repinfo->c->buffer, timenow, 1, worker->scratchpad,
|
||||||
udpsize, edns, (int)(edns->bits & EDNS_DO),
|
udpsize, edns, (int)(edns->bits & EDNS_DO),
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,7 @@
|
||||||
|
2 August 2023: George
|
||||||
|
- Move a cache reply callback in worker.c closer to the cache reply
|
||||||
|
generation.
|
||||||
|
|
||||||
1 August 2023: George
|
1 August 2023: George
|
||||||
- Merge #911 from natalie-reece: Exclude EDE before other EDNS options
|
- Merge #911 from natalie-reece: Exclude EDE before other EDNS options
|
||||||
when there isn't enough space.
|
when there isn't enough space.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue