]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Apply suggestion 15139/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 11 Feb 2025 13:18:25 +0000 (14:18 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 11 Feb 2025 13:43:48 +0000 (14:43 +0100)
Co-authored-by: Remi Gacogne <github@coredump.fr>
pdns/recursordist/syncres.cc

index fd16be3007772d457681b80d784be68a474985f3..53ff27f98f224242c50ed15ecd728cbaab64c451 100644 (file)
@@ -5552,7 +5552,7 @@ bool SyncRes::doResolveAtThisIP(const std::string& prefix, const DNSName& qname,
   }
 
   accountAuthLatency(lwr.d_usec, remoteIP.sin4.sin_family);
-  if (lwr.d_rcode >= 0 && lwr.d_rcode < static_cast<decltype(lwr.d_rcode)>(rec::Counters::RCodeCounters::numberOfRCodes)) {
+  if (lwr.d_rcode >= 0 && lwr.d_rcode < static_cast<decltype(lwr.d_rcode)>(t_Counters.at(rec::RCode::auth).rcodeCounters.size())) {
     ++t_Counters.at(rec::RCode::auth).rcodeCounters.at(static_cast<uint8_t>(lwr.d_rcode));
   }