]> granicus.if.org Git - pdns/commitdiff
dns64: stop hiding PTR indirection
authorPeter van Dijk <peter.van.dijk@powerdns.com>
Fri, 18 Oct 2019 10:31:55 +0000 (12:31 +0200)
committerPeter van Dijk <peter.van.dijk@powerdns.com>
Fri, 18 Oct 2019 10:31:55 +0000 (12:31 +0200)
pdns/lua-recursor4.cc

index 9381f96efc660d28cbfe1ae345066a97eaa6ac2c..74c3b0d2871103da043e9898869074974c7aa8dc 100644 (file)
@@ -111,13 +111,14 @@ static int getFakePTRRecords(const DNSName& qname, const std::string& prefix, ve
   newquery += "in-addr.arpa.";
 
 
+  DNSRecord rr;
+  rr.d_name = qname;
+  rr.d_type = QType::CNAME;
+  rr.d_content = std::make_shared<CNAMERecordContent>(newquery);
+  ret.push_back(rr);
+
   int rcode = directResolve(DNSName(newquery), QType(QType::PTR), 1, ret);
-  for(DNSRecord& rr :  ret)
-  {
-    if(rr.d_type == QType::PTR && rr.d_place==DNSResourceRecord::ANSWER) {
-      rr.d_name = qname;
-    }
-  }
+
   return rcode;
 
 }