From 0eb7e286f0e2778110ecf8998d38befeca499661 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Thu, 12 Jun 2025 10:22:06 +0200 Subject: [PATCH] dnsdist: Use `uint8_t` for rcodes, not `uint16_t` Signed-off-by: Remi Gacogne --- pdns/dnsdistdist/dnsdist-self-answers.cc | 2 +- pdns/dnsdistdist/dnsdist-self-answers.hh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pdns/dnsdistdist/dnsdist-self-answers.cc b/pdns/dnsdistdist/dnsdist-self-answers.cc index 6fd868b1c6..d18f563ff9 100644 --- a/pdns/dnsdistdist/dnsdist-self-answers.cc +++ b/pdns/dnsdistdist/dnsdist-self-answers.cc @@ -240,7 +240,7 @@ bool generateAnswerFromRawPacket(DNSQuestion& dnsQuestion, const PacketBuffer& p return true; } -bool removeRecordsAndSetRCode(DNSQuestion& dnsQuestion, uint16_t rcode) +bool removeRecordsAndSetRCode(DNSQuestion& dnsQuestion, uint8_t rcode) { bool dnssecOK = false; bool hadEDNS = false; diff --git a/pdns/dnsdistdist/dnsdist-self-answers.hh b/pdns/dnsdistdist/dnsdist-self-answers.hh index ddcfbb4154..2d6ea6238f 100644 --- a/pdns/dnsdistdist/dnsdist-self-answers.hh +++ b/pdns/dnsdistdist/dnsdist-self-answers.hh @@ -29,5 +29,5 @@ bool generateAnswerFromCNAME(DNSQuestion& dnsQuestion, const DNSName& cname, con bool generateAnswerFromIPAddresses(DNSQuestion& dnsQuestion, const std::vector& addresses, const ResponseConfig& responseConfig); bool generateAnswerFromRDataEntries(DNSQuestion& dnsQuestion, const std::vector& entries, std::optional typeForAny, const ResponseConfig& responseConfig); bool generateAnswerFromRawPacket(DNSQuestion& dnsQuestion, const PacketBuffer& packet); -bool removeRecordsAndSetRCode(DNSQuestion& dnsQuestion, uint16_t rcode); +bool removeRecordsAndSetRCode(DNSQuestion& dnsQuestion, uint8_t rcode); } -- 2.47.2