Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#420 breaks the mesh reply list function that need to reuse the dns answer. #517

Merged
merged 1 commit into from
Aug 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions services/listen_dnsport.c
Original file line number Diff line number Diff line change
Expand Up @@ -2477,6 +2477,10 @@ static int http2_query_read_done(struct http2_session* h2_session,
"buffer already assigned to stream");
return -1;
}

/* the c->buffer might be used by mesh_send_reply and no be cleard
* need to be cleared before use */
sldns_buffer_clear(h2_session->c->buffer);
if(sldns_buffer_remaining(h2_session->c->buffer) <
sldns_buffer_remaining(h2_stream->qbuffer)) {
/* qbuffer will be free'd in frame close cb */
Expand Down
1 change: 0 additions & 1 deletion util/netevent.c
Original file line number Diff line number Diff line change
Expand Up @@ -4063,7 +4063,6 @@ comm_point_send_reply(struct comm_reply *repinfo)
}
repinfo->c->h2_stream = NULL;
repinfo->c->tcp_is_reading = 0;
sldns_buffer_clear(repinfo->c->buffer);
comm_point_stop_listening(repinfo->c);
comm_point_start_listening(repinfo->c, -1,
adjusted_tcp_timeout(repinfo->c));
Expand Down