From: Otto Moerbeek Date: Fri, 17 Jan 2025 10:49:21 +0000 (+0100) Subject: To match incoming, don't look at subnet X-Git-Tag: rec-5.4.0-alpha0~18^2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b675edbb23cdac66ab6579e5046e787f33c5823;p=thirdparty%2Fpdns.git To match incoming, don't look at subnet --- 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; }