- Fix #1103: unbound 1.20.0 segmentation fault with nghttp2.

This commit is contained in:
W.C.A. Wijngaards 2024-07-12 16:11:29 +02:00
parent 51425b2388
commit 3adb9c8f92
5 changed files with 24 additions and 0 deletions

View File

@ -1,6 +1,9 @@
12 July 2024: Yorgos
- Add RPZ tag tests in acl_interface.tdir.
12 July 2024: Wouter
- Fix #1103: unbound 1.20.0 segmentation fault with nghttp2.
10 July 2024: Wouter
- For #773: In contrib/unbound.service.in set unbound to start after
network-online.target. Also for contrib/unbound_portable.service.in.

View File

@ -1576,6 +1576,10 @@ void mesh_query_done(struct mesh_state* mstate)
tcp_req_info_remove_mesh_state(r->query_reply.c->tcp_req_info, mstate);
r_buffer = NULL;
}
if(r->query_reply.c->use_h2) {
http2_stream_remove_mesh_state(
r->query_reply.c->h2_stream);
}
prev = r;
prev_buffer = r_buffer;
}
@ -2284,6 +2288,9 @@ mesh_serve_expired_callback(void* arg)
r, r_buffer, prev, prev_buffer);
if(r->query_reply.c->tcp_req_info)
tcp_req_info_remove_mesh_state(r->query_reply.c->tcp_req_info, mstate);
if(r->query_reply.c->use_h2)
http2_stream_remove_mesh_state(
r->query_reply.c->h2_stream);
infra_wait_limit_dec(mstate->s.env->infra_cache,
&r->query_reply, mstate->s.env->cfg);
prev = r;

View File

@ -1978,4 +1978,8 @@ void http2_stream_add_meshstate(struct http2_stream* ATTR_UNUSED(h2_stream),
{
}
void http2_stream_remove_mesh_state(struct http2_stream* ATTR_UNUSED(h2_stream))
{
}
/*********** End of Dummy routines ***********/

View File

@ -3307,6 +3307,13 @@ void http2_stream_add_meshstate(struct http2_stream* h2_stream,
h2_stream->mesh_state = m;
}
void http2_stream_remove_mesh_state(struct http2_stream* h2_stream)
{
if(!h2_stream)
return;
h2_stream->mesh_state = NULL;
}
/** delete http2 session server. After closing connection. */
static void http2_session_server_delete(struct http2_session* h2_session)
{

View File

@ -955,6 +955,9 @@ void http2_session_add_stream(struct http2_session* h2_session,
void http2_stream_add_meshstate(struct http2_stream* h2_stream,
struct mesh_area* mesh, struct mesh_state* m);
/** Remove mesh state from stream. When the mesh state has been removed. */
void http2_stream_remove_mesh_state(struct http2_stream* h2_stream);
/**
* This routine is published for checks and tests, and is only used internally.
* handle libevent callback for timer comm.