]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
To match incoming, don't look at subnet
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 17 Jan 2025 10:49:21 +0000 (11:49 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 14 Jul 2025 07:10:08 +0000 (09:10 +0200)
pdns/recursordist/lwres.cc
pdns/recursordist/syncres.hh

index 06096bb8970dbe55b7c072c10098eb92522e5736..4dddb0c34a688e37940e3c3eb21cbc84addcc680 100644 (file)
@@ -424,6 +424,7 @@ static LWResult::Result asyncresolve(const ComboAddress& address, const DNSName&
   if (EDNS0Level > 0) {
     DNSPacketWriter::optvect_t opts;
     if (srcmask) {
+      subnetOpts = EDNSSubnetOpts{};
       subnetOpts->setSource(*srcmask);
       opts.emplace_back(EDNSOptionCode::ECS, subnetOpts->makeOptString());
     }
index ec139815ecddfe0b0165dc7f8a6afc820ec73a98..d81c5c46f2313bbef82b4435796582163879ee51 100644 (file)
@@ -832,10 +832,10 @@ struct PacketIDCompare
 {
   bool operator()(const std::shared_ptr<PacketID>& lhs, const std::shared_ptr<PacketID>& rhs) const
   {
-    if (std::tie(lhs->remote, lhs->tcpsock, lhs->type, lhs->ecsSubnet) < std::tie(rhs->remote, rhs->tcpsock, rhs->type, rhs->ecsSubnet)) {
+    if (std::tie(lhs->remote, lhs->tcpsock, lhs->type) < std::tie(rhs->remote, rhs->tcpsock, rhs->type)) {
       return true;
     }
-    if (std::tie(lhs->remote, lhs->tcpsock, lhs->type, lhs->ecsSubnet) > std::tie(rhs->remote, rhs->tcpsock, rhs->type, rhs->ecsSubnet)) {
+    if (std::tie(lhs->remote, lhs->tcpsock, lhs->type) > std::tie(rhs->remote, rhs->tcpsock, rhs->type)) {
       return false;
     }