From: W.C.A. Wijngaards Date: Mon, 15 Jul 2024 12:51:20 +0000 (+0200) Subject: - For #1103: fix to also drop mesh state reference when the discard X-Git-Tag: release-1.21.0rc1~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8947c2c7646c2f8646b3e10efe25552f5e789068;p=thirdparty%2Funbound.git - 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. --- diff --git a/doc/Changelog b/doc/Changelog index 14e09ab41..30c267cb4 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -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 diff --git a/services/mesh.c b/services/mesh.c index fa03c63d8..a78e9dde9 100644 --- a/services/mesh.c +++ b/services/mesh.c @@ -566,6 +566,8 @@ servfail_mem: 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); @@ -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++; @@ -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 { @@ -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++;