]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Don't thow in slowParseEDNSOptions(), return false if arcount is zero
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 15 Jul 2025 12:46:42 +0000 (14:46 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 15 Jul 2025 12:46:42 +0000 (14:46 +0200)
Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
pdns/ednsoptions.cc

index 2d0377b8a7b3c945a3edd9f5a6183cfdbdb974f3..9398ecd0f568332eea48584b7dfd64893b202763 100644 (file)
@@ -107,7 +107,7 @@ bool slowParseEDNSOptions(const PacketBuffer& packet, EDNSOptionViewMap& options
   }
 
   if (ntohs(dnsHeader->arcount) == 0) {
-    throw std::runtime_error("slowParseEDNSOptions() should not be called for queries that have no EDNS");
+    return false;
   }
 
   try {