Skip to content

Commit

Permalink
- For #1103: fix to also drop mesh state reference when the discard
Browse files Browse the repository at this point in the history
  limit is reached, when there is an error making a new recursion
  state and when the connection is dropped with is_drop.
  • Loading branch information
wcawijngaards committed Jul 15, 2024
1 parent b1e3319 commit 8947c2c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions doc/Changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
15 July 2024: Wouter
- For #1103: fix to also drop mesh state reference when the discard
limit is reached, when there is an error making a new recursion
state and when the connection is dropped with is_drop.

12 July 2024: Yorgos
- Add RPZ tag tests in acl_interface.tdir.
- For #1102: clearer text for using interface-* options for the
Expand Down
12 changes: 12 additions & 0 deletions services/mesh.c
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,8 @@ void mesh_new_client(struct mesh_area* mesh, struct query_info* qinfo,
edns->opt_list_inplace_cb_out = NULL;
error_encode(r_buffer, LDNS_RCODE_SERVFAIL,
qinfo, qid, qflags, edns);
if(rep->c->use_h2)
http2_stream_remove_mesh_state(rep->c->h2_stream);
comm_point_send_reply(rep);
if(added)
mesh_state_delete(&s->s);
Expand Down Expand Up @@ -1533,6 +1535,9 @@ void mesh_query_done(struct mesh_state* mstate)
infra_wait_limit_dec(mstate->s.env->infra_cache,
&r->query_reply, mstate->s.env->cfg);
mstate->reply_list = NULL;
if(r->query_reply.c->use_h2)
http2_stream_remove_mesh_state(
r->query_reply.c->h2_stream);
comm_point_drop_reply(&r->query_reply);
mstate->reply_list = reply_list;
mstate->s.env->mesh->stats_dropped++;
Expand Down Expand Up @@ -1565,6 +1570,10 @@ void mesh_query_done(struct mesh_state* mstate)
infra_wait_limit_dec(mstate->s.env->infra_cache,
&r->query_reply, mstate->s.env->cfg);
mstate->reply_list = NULL;
if(r->query_reply.c->use_h2) {
http2_stream_remove_mesh_state(
r->query_reply.c->h2_stream);
}
comm_point_drop_reply(&r->query_reply);
mstate->reply_list = reply_list;
} else {
Expand Down Expand Up @@ -2258,6 +2267,9 @@ mesh_serve_expired_callback(void* arg)
infra_wait_limit_dec(mstate->s.env->infra_cache,
&r->query_reply, mstate->s.env->cfg);
mstate->reply_list = NULL;
if(r->query_reply.c->use_h2)
http2_stream_remove_mesh_state(
r->query_reply.c->h2_stream);
comm_point_drop_reply(&r->query_reply);
mstate->reply_list = reply_list;
mstate->s.env->mesh->stats_dropped++;
Expand Down

0 comments on commit 8947c2c

Please sign in to comment.