]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
fuzz: update canHashPacket() calls accordingly 10791/head
authorCharles-Henri Bruyand <charles-henri.bruyand@open-xchange.com>
Wed, 6 Oct 2021 12:30:35 +0000 (14:30 +0200)
committerCharles-Henri Bruyand <charles-henri.bruyand@open-xchange.com>
Wed, 6 Oct 2021 12:30:35 +0000 (14:30 +0200)
pdns/fuzz_packetcache.cc

index 98f99d372fbf4e67fab7b001683224936841305e..0c982d0e72acf76a72471bc6d7a40ba31fb9bd54 100644 (file)
@@ -39,7 +39,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
   try {
     static const std::unordered_set<uint16_t> optionsToIgnore{ EDNSOptionCode::COOKIE };
 
-    PacketCache::canHashPacket(input, false);
+    PacketCache::canHashPacket(input, optionsToIgnore);
     DNSName qname(input.data(), input.size(), sizeof(dnsheader), false);
     PacketCache::queryMatches(input, input, qname, optionsToIgnore);
   }
@@ -52,7 +52,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
   try {
     static const std::unordered_set<uint16_t> optionsToIgnore{ EDNSOptionCode::COOKIE, EDNSOptionCode::ECS };
 
-    PacketCache::canHashPacket(input, true);
+    PacketCache::canHashPacket(input, optionsToIgnore);
     DNSName qname(input.data(), input.size(), sizeof(dnsheader), false);
     PacketCache::queryMatches(input, input, qname, optionsToIgnore);
   }