]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
For the NOD lookup case, we don't want QName Minimization. 10420/head
authorOtto <otto.moerbeek@open-xchange.com>
Tue, 18 May 2021 13:40:44 +0000 (15:40 +0200)
committerOtto <otto.moerbeek@open-xchange.com>
Tue, 18 May 2021 13:40:44 +0000 (15:40 +0200)
pdns/pdns_recursor.cc
pdns/syncres.cc
pdns/syncres.hh

index f0d79cb682b73ff6ead25e08f316ceac046d8a2b..3b974d0bd3cf79471059778fdb5462f22e5e493e 100644 (file)
@@ -1335,7 +1335,7 @@ static void sendNODLookup(const DNSName& dname)
       return;
     }
     vector<DNSRecord> dummy;
-    directResolve(qname, QType::A, QClass::IN, dummy);
+    directResolve(qname, QType::A, QClass::IN, dummy, false);
   }
 }
 
index 103bfa73af7ae05d4b8bd1b2b836942b0a7cdc4d..dc00e152c5859247091fb25815d629a74df1a421 100644 (file)
@@ -4350,13 +4350,20 @@ void SyncRes::parseEDNSSubnetAddFor(const std::string& subnetlist)
   }
 }
 
-// used by PowerDNSLua - note that this neglects to add the packet count & statistics back to pdns_ercursor.cc
+// used by PowerDNSLua - note that this neglects to add the packet count & statistics back to pdns_recursor.cc
 int directResolve(const DNSName& qname, const QType qtype, const QClass qclass, vector<DNSRecord>& ret)
+{
+  return directResolve(qname, qtype, qclass, ret, SyncRes::s_qnameminimization);
+}
+
+int directResolve(const DNSName& qname, const QType qtype, const QClass qclass, vector<DNSRecord>& ret, bool qm)
 {
   struct timeval now;
   gettimeofday(&now, 0);
 
   SyncRes sr(now);
+  sr.setQNameMinimization(qm);
+
   int res = -1;
   try {
     res = sr.beginResolve(qname, qtype, qclass, ret, 0);
index a3bf8509536f8643a5ac98edadca8763fa35fa9a..4f931fadd04384f276c9c9b6abbc12a665ce8746 100644 (file)
@@ -1115,6 +1115,7 @@ void broadcastFunction(const pipefunc_t& func);
 void distributeAsyncFunction(const std::string& question, const pipefunc_t& func);
 
 int directResolve(const DNSName& qname, const QType qtype, const QClass qclass, vector<DNSRecord>& ret);
+int directResolve(const DNSName& qname, const QType qtype, const QClass qclass, vector<DNSRecord>& ret, bool qm);
 int followCNAMERecords(std::vector<DNSRecord>& ret, const QType qtype, int oldret);
 int getFakeAAAARecords(const DNSName& qname, ComboAddress prefix, vector<DNSRecord>& ret);
 int getFakePTRRecords(const DNSName& qname, vector<DNSRecord>& ret);