Merge pull request #517 from dyunwei/master

#420 breaks the mesh reply list function that need to reuse the dns answer.
This commit is contained in:
Wouter Wijngaards 2021-08-03 13:11:01 +02:00 committed by GitHub
commit 5196ee03e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -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 */

View file

@ -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));