From: W.C.A. Wijngaards Date: Wed, 12 Jun 2019 06:32:45 +0000 (+0200) Subject: - Fix another spoolbuf storage code point, in prefetch. X-Git-Tag: release-1.9.2rc3^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af6c5dea43fc63452d49b2339e607365b6652987;p=thirdparty%2Funbound.git - Fix another spoolbuf storage code point, in prefetch. --- diff --git a/daemon/worker.c b/daemon/worker.c index fc93817a0..661f6967d 100644 --- a/daemon/worker.c +++ b/daemon/worker.c @@ -772,8 +772,14 @@ reply_and_prefetch(struct worker* worker, struct query_info* qinfo, { /* first send answer to client to keep its latency * as small as a cachereply */ - if(sldns_buffer_limit(repinfo->c->buffer) != 0) + if(sldns_buffer_limit(repinfo->c->buffer) != 0) { + if(repinfo->c->tcp_req_info) { + sldns_buffer_copy( + repinfo->c->tcp_req_info->spool_buffer, + repinfo->c->buffer); + } comm_point_send_reply(repinfo); + } server_stats_prefetch(&worker->stats, worker); /* create the prefetch in the mesh as a normal lookup without diff --git a/doc/Changelog b/doc/Changelog index 683ddc2b3..eed029034 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,6 @@ +12 June 2019: Wouter + - Fix another spoolbuf storage code point, in prefetch. + 11 June 2019: Wouter - Fix that fixes the Fix that spoolbuf is not used to store tcp pipelined response between mesh send and callback end, this fixes diff --git a/util/netevent.c b/util/netevent.c index 665b5b0d2..9e2ba92b5 100644 --- a/util/netevent.c +++ b/util/netevent.c @@ -1567,7 +1567,6 @@ comm_point_tcp_handle_write(int fd, struct comm_point* c) iov[1].iov_base = sldns_buffer_begin(buffer); iov[1].iov_len = sldns_buffer_limit(buffer); log_assert(iov[0].iov_len > 0); - log_assert(iov[1].iov_len > 0); msg.msg_name = &c->repinfo.addr; msg.msg_namelen = c->repinfo.addrlen; msg.msg_iov = iov; @@ -1634,7 +1633,6 @@ comm_point_tcp_handle_write(int fd, struct comm_point* c) iov[1].iov_base = sldns_buffer_begin(buffer); iov[1].iov_len = sldns_buffer_limit(buffer); log_assert(iov[0].iov_len > 0); - log_assert(iov[1].iov_len > 0); r = writev(fd, iov, 2); #else /* HAVE_WRITEV */ r = send(fd, (void*)(((uint8_t*)&len)+c->tcp_byte_count),