summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorStuart Henderson <sthen@cvs.openbsd.org>2019-02-08 20:45:15 +0000
committerStuart Henderson <sthen@cvs.openbsd.org>2019-02-08 20:45:15 +0000
commit41ca1d023253180071acaf8e2bd70aeeaf304d68 (patch)
treeb242e5cbd6eceaf1aff8717199ffd8e9476135f7 /sbin
parentdc851c4b755a84e7682e9aa102263375b9914427 (diff)
Backport r5108 from unbound upstream, pointed out by florian@.
Shouldn't affect unwind but keeping in sync. r5108 | wouter | 2019-02-08 15:05:24 +0000 (Fri, 08 Feb 2019) | 3 lines - Fix #4225: clients seem to erroneously receive no answer with DNS-over-TLS and qname-minimisation.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/unwind/libunbound/services/listen_dnsport.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sbin/unwind/libunbound/services/listen_dnsport.c b/sbin/unwind/libunbound/services/listen_dnsport.c
index f86a83d9673..664072aa483 100644
--- a/sbin/unwind/libunbound/services/listen_dnsport.c
+++ b/sbin/unwind/libunbound/services/listen_dnsport.c
@@ -1779,6 +1779,12 @@ tcp_req_info_handle_readdone(struct tcp_req_info* req)
/* If mesh failed(mallocfail) and called commpoint_send_reply with
* something like servfail then we pick up that reply below. */
if(req->is_reply) {
+ /* reply from mesh is in the spool_buffer */
+ sldns_buffer_clear(c->buffer);
+ sldns_buffer_write(c->buffer,
+ sldns_buffer_begin(req->spool_buffer),
+ sldns_buffer_limit(req->spool_buffer));
+ sldns_buffer_flip(c->buffer);
goto send_it;
}