From: Remi Gacogne Date: Mon, 14 Dec 2020 10:44:41 +0000 (+0100) Subject: rec: Fix the NSEC3 hashes cache on older systems X-Git-Tag: rec-4.5.0-alpha1~67^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a398d2ca66cffdbc7b3e96366fa5978e8f7cf32e;p=thirdparty%2Fpdns.git rec: Fix the NSEC3 hashes cache on older systems By explicitely constructing the tuple. --- diff --git a/pdns/validate.cc b/pdns/validate.cc index 9b70952284..08e00dd6df 100644 --- a/pdns/validate.cc +++ b/pdns/validate.cc @@ -90,14 +90,15 @@ static std::string getHashFromNSEC3(const DNSName& qname, const std::shared_ptr< return result; } - auto it = cache.find({qname, nsec3->d_salt, nsec3->d_iterations}); + auto key = std::make_tuple(qname, nsec3->d_salt, nsec3->d_iterations); + auto it = cache.find(key); if (it != cache.end()) { return it->second; } result = hashQNameWithSalt(nsec3->d_salt, nsec3->d_iterations, qname); - cache[{qname, nsec3->d_salt, nsec3->d_iterations}] = result; + cache[key] = result; return result; }