From d9442969134417a95b7fdf528a1799e3aea5196f Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Fri, 7 Jul 2017 00:11:49 +0200 Subject: [PATCH] dnsdist: Fix TCP short writes handling --- pdns/iputils.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/pdns/iputils.cc b/pdns/iputils.cc index 8b8601966..53308e5d6 100644 --- a/pdns/iputils.cc +++ b/pdns/iputils.cc @@ -357,6 +357,7 @@ bool sendSizeAndMsgWithTimeout(int sock, uint16_t bufferLen, const char* buffer, do { if (written < iov[pos].iov_len) { iov[pos].iov_len -= written; + iov[pos].iov_base = reinterpret_cast(reinterpret_cast(iov[pos].iov_base) + written); written = 0; } else { -- 2.50.0