From: Peter van Dijk Date: Mon, 2 May 2016 15:22:21 +0000 (+0200) Subject: make ALIAS expansion in outgoing AXFR optional X-Git-Tag: rec-4.0.0-alpha3~1^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7f6f4d4f8c9f6a408b46ee1368a0fd1c45fd1b10;p=pdns make ALIAS expansion in outgoing AXFR optional --- diff --git a/pdns/common_startup.cc b/pdns/common_startup.cc index 1f06d0bf6..af683d9bf 100644 --- a/pdns/common_startup.cc +++ b/pdns/common_startup.cc @@ -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); diff --git a/pdns/pdns.conf-dist b/pdns/pdns.conf-dist index 6ae2c787e..397355465 100644 --- a/pdns/pdns.conf-dist +++ b/pdns/pdns.conf-dist @@ -359,6 +359,11 @@ # # 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 # diff --git a/pdns/tcpreceiver.cc b/pdns/tcpreceiver.cc index fc771a36e..3417fd11d 100644 --- a/pdns/tcpreceiver.cc +++ b/pdns/tcpreceiver.cc @@ -737,7 +737,7 @@ int TCPNameserver::doAXFR(const DNSName &target, shared_ptr 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 ips=fns.lookup(DNSName(rr.content), (DNSBackend *) NULL); for(const auto& ip: ips) {