From 9d0e129b7b576604a3bf7c338647b31447de72ae Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Mon, 8 Jul 2024 14:58:20 +0200 Subject: [PATCH] dnsdist: Fix code formatting --- pdns/xsk.cc | 4 ++-- pdns/xsk.hh | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pdns/xsk.cc b/pdns/xsk.cc index 5178a03a08..f2757ebe3c 100644 --- a/pdns/xsk.cc +++ b/pdns/xsk.cc @@ -88,7 +88,7 @@ void checkUmemIntegrity(const char* function, int line, std::shared_ptrat({vect.get(), offset}).status) == 0) { - std::cerr << "UMEM integrity check failed at " << function << ": " << line << ": status of "<<(void*)vect.get()<<", "<(umems->at({vect.get(), offset}).status) << ", expected: "; + std::cerr << "UMEM integrity check failed at " << function << ": " << line << ": status of " << (void*)vect.get() << ", " << offset << " is " << static_cast(umems->at({vect.get(), offset}).status) << ", expected: "; for (const auto status : validStatuses) { std::cerr << static_cast(status) << " "; } @@ -918,7 +918,7 @@ void XskPacket::rewrite() noexcept /* needed to get the correct checksum */ setIPv4Header(ipHeader); setUDPHeader(udpHeader); - //udpHeader.check = tcp_udp_v4_checksum(&ipHeader); + // udpHeader.check = tcp_udp_v4_checksum(&ipHeader); rewriteIpv4Header(&ipHeader, getFrameLen()); setIPv4Header(ipHeader); setUDPHeader(udpHeader); diff --git a/pdns/xsk.hh b/pdns/xsk.hh index df312e399e..fdb9a24d1a 100644 --- a/pdns/xsk.hh +++ b/pdns/xsk.hh @@ -275,7 +275,11 @@ bool operator<(const XskPacket& lhs, const XskPacket& rhs) noexcept; class XskWorker { public: - enum class Type : uint8_t { OutgoingOnly, Bidirectional}; + enum class Type : uint8_t + { + OutgoingOnly, + Bidirectional + }; private: using XskPacketRing = boost::lockfree::spsc_queue>; -- 2.47.2