]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Backport of #10420 to rec 4.5.x 10422/head
authorOtto <otto.moerbeek@open-xchange.com>
Tue, 18 May 2021 14:59:23 +0000 (16:59 +0200)
committerOtto <otto.moerbeek@open-xchange.com>
Tue, 18 May 2021 14:59:23 +0000 (16:59 +0200)
pdns/pdns_recursor.cc
pdns/syncres.cc
pdns/syncres.hh

index e907670fa9b1af5dd101530eb5d5187828493058..a31c47d413247f19ec626d1822a3d3b57fb74444 100644 (file)
@@ -1337,7 +1337,7 @@ static void sendNODLookup(const DNSName& dname)
       return;
     }
     vector<DNSRecord> dummy;
-    directResolve(qname, qt, qc, dummy);
+    directResolve(qname, qt, qc, dummy, false);
   }
 }
 
index a1cc8fc7fc832ac224d213041c2c376460f6db35..8cfed6f1faaff1b367a89bdfc0fd5f8b303e8173 100644 (file)
@@ -4339,13 +4339,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
 int directResolve(const DNSName& qname, const QType qtype, int qclass, vector<DNSRecord>& ret)
+{
+  return directResolve(qname, qtype, qclass, ret, SyncRes::s_qnameminimization);
+}
+
+// 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, int 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 35a6645da06de2a2be04ccd0918aafb60100c13c..13f9c3e0d2c99ec794255061c8b067cc7083c50d 100644 (file)
@@ -1125,6 +1125,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, int qclass, vector<DNSRecord>& ret);
+int directResolve(const DNSName& qname, const QType qtype, int 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);