From: Remi Gacogne Date: Thu, 12 Jun 2025 08:22:06 +0000 (+0200) Subject: dnsdist: Use `uint8_t` for rcodes, not `uint16_t` X-Git-Tag: dnsdist-2.0.0-beta1~21^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0eb7e286f0e2778110ecf8998d38befeca499661;p=thirdparty%2Fpdns.git dnsdist: Use `uint8_t` for rcodes, not `uint16_t` Signed-off-by: Remi Gacogne --- 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); }