From: Remi Gacogne Date: Thu, 6 Jul 2017 22:11:49 +0000 (+0200) Subject: dnsdist: Fix TCP short writes handling X-Git-Tag: rec-4.1.0-alpha1~33^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d9442969134417a95b7fdf528a1799e3aea5196f;p=thirdparty%2Fpdns.git dnsdist: Fix TCP short writes handling --- diff --git a/pdns/iputils.cc b/pdns/iputils.cc index 8b8601966d..53308e5d62 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 {