From: Remi Gacogne Date: Thu, 14 Dec 2017 22:11:25 +0000 (+0100) Subject: rec: Make sure that the ECS scope from the auth is < to the source X-Git-Tag: dnsdist-1.3.1~95^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=30d4402d06b494c36eb75cff80e2ecce9ca02e17;p=thirdparty%2Fpdns.git rec: Make sure that the ECS scope from the auth is < to the source --- diff --git a/pdns/lwres.cc b/pdns/lwres.cc index ccbb4dd332..218bb2ad2f 100644 --- a/pdns/lwres.cc +++ b/pdns/lwres.cc @@ -116,13 +116,17 @@ int asyncresolve(const ComboAddress& ip, const DNSName& domain, int type, bool d string ping; bool weWantEDNSSubnet=false; + uint8_t outgoingECSBits = 0; + ComboAddress outgoingECSAddr; if(EDNS0Level > 0) { DNSPacketWriter::optvect_t opts; if(srcmask) { EDNSSubnetOpts eo; eo.source = *srcmask; + outgoingECSBits = srcmask->getBits(); + outgoingECSAddr = srcmask->getNetwork(); // cout<<"Adding request mask: "<