From: Remi Gacogne Date: Mon, 22 Jan 2024 11:28:25 +0000 (+0100) Subject: dnsdist: Clear the XSK responder notification queue right away X-Git-Tag: dnsdist-1.9.0-rc1^2~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=465bf9e23403a94a79f19de752dc1bc035032d00;p=thirdparty%2Fpdns.git dnsdist: Clear the XSK responder notification queue right away Otherwise we might discard a valid notification between our last look at the queue and the clearing. --- diff --git a/pdns/dnsdistdist/dnsdist-xsk.cc b/pdns/dnsdistdist/dnsdist-xsk.cc index 2996683c95..fc77706aa0 100644 --- a/pdns/dnsdistdist/dnsdist-xsk.cc +++ b/pdns/dnsdistdist/dnsdist-xsk.cc @@ -48,6 +48,7 @@ void XskResponderThread(std::shared_ptr dss, std::shared_ptrcleanSocketNotification(); #if defined(__SANITIZE_THREAD__) xskInfo->incomingPacketsQueue.lock()->consume_all([&](XskPacket& packet) { #else @@ -98,7 +99,6 @@ void XskResponderThread(std::shared_ptr dss, std::shared_ptrpushToSendQueue(packet); }); - xskInfo->cleanSocketNotification(); } if (needNotify) { xskInfo->notifyXskSocket();