]> git.ipfire.org Git - thirdparty/pdns.git/commit
dnsdist: Do not oversize the received buffer with `recvmmsg`
authorRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 2 Apr 2026 08:17:41 +0000 (10:17 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 2 Apr 2026 08:17:41 +0000 (10:17 +0200)
commit2025bb78fc98fb4cf44bfb9a3ca8e5bbb2415ecd
treeacd87dcbcc34a962c5ca96572f0030c5ff3daf29
parente690856b48af4d2ba1c6002180b971ea27f0629b
dnsdist: Do not oversize the received buffer with `recvmmsg`

Passing `MSG_TRUNC` to `recvmmsg` causes the Linux kernel to report
the real size of the datagram even if it was longer than the passed
buffer, which is not what we want here as it would be wasteful to
resize our internal buffer to this size.

This was reported by komaku in #YWH-PGM6095-172, many thanks!.

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
pdns/dnsdistdist/dnsdist.cc