From 7b675edbb23cdac66ab6579e5046e787f33c5823 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Fri, 17 Jan 2025 11:49:21 +0100 Subject: [PATCH] To match incoming, don't look at subnet --- pdns/recursordist/lwres.cc | 1 + pdns/recursordist/syncres.hh | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pdns/recursordist/lwres.cc b/pdns/recursordist/lwres.cc index 06096bb897..4dddb0c34a 100644 --- a/pdns/recursordist/lwres.cc +++ b/pdns/recursordist/lwres.cc @@ -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()); } diff --git a/pdns/recursordist/syncres.hh b/pdns/recursordist/syncres.hh index ec139815ec..d81c5c46f2 100644 --- a/pdns/recursordist/syncres.hh +++ b/pdns/recursordist/syncres.hh @@ -832,10 +832,10 @@ struct PacketIDCompare { bool operator()(const std::shared_ptr& lhs, const std::shared_ptr& 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; } -- 2.47.2