From: Remi Gacogne Date: Mon, 22 Jan 2024 11:28:09 +0000 (+0100) Subject: dnsdist: Properly delay response packets in incoming-only XSK mode X-Git-Tag: dnsdist-1.9.0-rc1^2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b99619110687818dac3de00805722d37c4ea4d5;p=thirdparty%2Fpdns.git dnsdist: Properly delay response packets in incoming-only XSK mode --- diff --git a/pdns/dnsdist.cc b/pdns/dnsdist.cc index 32521e7fbe..cf3f6129e9 100644 --- a/pdns/dnsdist.cc +++ b/pdns/dnsdist.cc @@ -883,6 +883,9 @@ void responderThread(std::shared_ptr dss) xskPacket->setHeader(ids->xskPacketHeader); if (!xskPacket->setPayload(response)) { } + if (ids->delayMsec > 0) { + xskPacket->addDelay(ids->delayMsec); + } xskPacket->updatePacket(); xskInfo->pushToSendQueue(*xskPacket); xskInfo->notifyXskSocket();