]> granicus.if.org Git - pdns/commitdiff
make ALIAS expansion in outgoing AXFR optional
authorPeter van Dijk <peter.van.dijk@powerdns.com>
Mon, 2 May 2016 15:22:21 +0000 (17:22 +0200)
committerPeter van Dijk <peter.van.dijk@powerdns.com>
Mon, 9 May 2016 12:43:43 +0000 (14:43 +0200)
pdns/common_startup.cc
pdns/pdns.conf-dist
pdns/tcpreceiver.cc

index 1f06d0bf6d06d488339e0252fbdde07d650b46e6..af683d9bf6fa9ca01d59b708d3b6f0b6cb6e1c0e 100644 (file)
@@ -180,6 +180,8 @@ void declareArguments()
 
   ::arg().set("include-dir","Include *.conf files from this directory");
   ::arg().set("security-poll-suffix","Domain name from which to query security update notifications")="secpoll.powerdns.com.";
+
+  ::arg().setSwitch("outgoing-axfr-expand-alias", "Expand ALIAS records during outgoing AXFR")="no";
 }
 
 static time_t s_start=time(0);
index 6ae2c787e1f3f023dfca4e5815a77357656df33a..3973554658c7326098be0f2acf5d5d1a0488b378 100644 (file)
 #
 # out-of-zone-additional-processing=yes
 
+#################################
+# outgoing-axfr-expand-alias   Expand ALIAS records during outgoing AXFR
+#
+# outgoing-axfr-expand-alias=no
+
 #################################
 # overload-queue-length        Maximum queuelength moving to packetcache only
 #
index fc771a36e5c844894757fbe4d79a956f992bd83c..3417fd11db3df4c8376e69fb1c7f41e8f0784bb0 100644 (file)
@@ -737,7 +737,7 @@ int TCPNameserver::doAXFR(const DNSName &target, shared_ptr<DNSPacket> q, int ou
 
   while(sd.db->get(rr)) {
     if(rr.qname.isPartOf(target)) {
-      if (rr.qtype.getCode() == QType::ALIAS) {
+      if (rr.qtype.getCode() == QType::ALIAS && ::arg().mustDo("outgoing-axfr-expand-alias")) {
         FindNS fns;
         vector<string> ips=fns.lookup(DNSName(rr.content), (DNSBackend *) NULL);
         for(const auto& ip: ips) {