mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
- Fix for mesh accounting when rpz decides to drop a reply with a
tcp stream waiting for it.
This commit is contained in:
parent
6f0c2956ac
commit
84b0207956
2 changed files with 13 additions and 5 deletions
|
|
@ -5,6 +5,8 @@
|
||||||
can see the reply_info.
|
can see the reply_info.
|
||||||
- Fix for mesh accounting if the reply list already empty to begin
|
- Fix for mesh accounting if the reply list already empty to begin
|
||||||
with.
|
with.
|
||||||
|
- Fix for mesh accounting when rpz decides to drop a reply with a
|
||||||
|
tcp stream waiting for it.
|
||||||
|
|
||||||
24 June 2020: Wouter
|
24 June 2020: Wouter
|
||||||
- iana portlist updated.
|
- iana portlist updated.
|
||||||
|
|
|
||||||
|
|
@ -1296,7 +1296,7 @@ mesh_send_reply(struct mesh_state* m, int rcode, struct reply_info* rep,
|
||||||
|
|
||||||
void mesh_query_done(struct mesh_state* mstate)
|
void mesh_query_done(struct mesh_state* mstate)
|
||||||
{
|
{
|
||||||
struct mesh_reply* r, *reply_list = NULL;
|
struct mesh_reply* r;
|
||||||
struct mesh_reply* prev = NULL;
|
struct mesh_reply* prev = NULL;
|
||||||
struct sldns_buffer* prev_buffer = NULL;
|
struct sldns_buffer* prev_buffer = NULL;
|
||||||
struct mesh_cb* c;
|
struct mesh_cb* c;
|
||||||
|
|
@ -1320,8 +1320,7 @@ void mesh_query_done(struct mesh_state* mstate)
|
||||||
free(err);
|
free(err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
reply_list = mstate->reply_list;
|
for(r = mstate->reply_list; r; r = r->next) {
|
||||||
for(r = reply_list; r; r = r->next) {
|
|
||||||
/* if a response-ip address block has been stored the
|
/* if a response-ip address block has been stored the
|
||||||
* information should be logged for each client. */
|
* information should be logged for each client. */
|
||||||
if(mstate->s.respip_action_info &&
|
if(mstate->s.respip_action_info &&
|
||||||
|
|
@ -1345,7 +1344,15 @@ void mesh_query_done(struct mesh_state* mstate)
|
||||||
/* if this query is determined to be dropped during the
|
/* if this query is determined to be dropped during the
|
||||||
* mesh processing, this is the point to take that action. */
|
* mesh processing, this is the point to take that action. */
|
||||||
if(mstate->s.is_drop) {
|
if(mstate->s.is_drop) {
|
||||||
|
/* briefly set the reply_list to NULL, so that the
|
||||||
|
* tcp req info cleanup routine that calls the mesh
|
||||||
|
* to deregister the meshstate for it is not done
|
||||||
|
* because the list is NULL and also accounting is not
|
||||||
|
* done there, but instead we do that here. */
|
||||||
|
struct mesh_reply* reply_list = mstate->reply_list;
|
||||||
|
mstate->reply_list = NULL;
|
||||||
comm_point_drop_reply(&r->query_reply);
|
comm_point_drop_reply(&r->query_reply);
|
||||||
|
mstate->reply_list = reply_list;
|
||||||
} else {
|
} else {
|
||||||
struct sldns_buffer* r_buffer = r->query_reply.c->buffer;
|
struct sldns_buffer* r_buffer = r->query_reply.c->buffer;
|
||||||
if(r->query_reply.c->tcp_req_info) {
|
if(r->query_reply.c->tcp_req_info) {
|
||||||
|
|
@ -1950,8 +1957,7 @@ mesh_serve_expired_callback(void* arg)
|
||||||
if(verbosity >= VERB_ALGO)
|
if(verbosity >= VERB_ALGO)
|
||||||
log_dns_msg("Serve expired lookup", &qstate->qinfo, msg->rep);
|
log_dns_msg("Serve expired lookup", &qstate->qinfo, msg->rep);
|
||||||
|
|
||||||
r = mstate->reply_list;
|
for(r = mstate->reply_list; r; r = r->next) {
|
||||||
for(; r; r = r->next) {
|
|
||||||
/* If address info is returned, it means the action should be an
|
/* If address info is returned, it means the action should be an
|
||||||
* 'inform' variant and the information should be logged. */
|
* 'inform' variant and the information should be logged. */
|
||||||
if(actinfo.addrinfo) {
|
if(actinfo.addrinfo) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue