diff --git a/pdns/auth-packetcache.cc b/pdns/auth-packetcache.cc index 15f2bf358a4d..0a4a835c09f1 100644 --- a/pdns/auth-packetcache.cc +++ b/pdns/auth-packetcache.cc @@ -58,7 +58,8 @@ bool AuthPacketCache::get(DNSPacket& p, DNSPacket& cached) cleanupIfNeeded(); - uint32_t hash = canHashPacket(p.getString(), /* don't skip ECS */ false); + static const std::unordered_set optionsToSkip{ EDNSOptionCode::COOKIE}; + uint32_t hash = canHashPacket(p.getString(), /* don't skip ECS */optionsToSkip); p.setHash(hash); string value; diff --git a/pdns/test-packetcache_cc.cc b/pdns/test-packetcache_cc.cc index e37c4b062ee3..5fcfff8216aa 100644 --- a/pdns/test-packetcache_cc.cc +++ b/pdns/test-packetcache_cc.cc @@ -165,7 +165,7 @@ try we directly compute the hash instead of querying the cache because 1/ it's faster 2/ no deferred-lookup issues */ - q.setHash(g_PC->canHashPacket(q.getString(), false)); + q.setHash(g_PC->canHashPacket(q.getString())); const unsigned int maxTTL = 3600; g_PC->insert(q, r, maxTTL);