]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec: Fix the NSEC3 hashes cache on older systems 10221/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 14 Dec 2020 10:44:41 +0000 (11:44 +0100)
committerOtto <otto.moerbeek@open-xchange.com>
Fri, 26 Mar 2021 07:34:32 +0000 (08:34 +0100)
By explicitely constructing the tuple.

(cherry picked from commit a398d2ca66cffdbc7b3e96366fa5978e8f7cf32e)

pdns/validate.cc

index 1b80e4982d49b56ef3ca268962a86694047708b3..2f55058031c4d32d65c418a725112024e8b2f744 100644 (file)
@@ -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;
 }