Skip to content

Commit

Permalink
add disable-axfr-rectify config option
Browse files Browse the repository at this point in the history
  • Loading branch information
mind04 committed May 6, 2014
1 parent b772ffe commit 5633a4a
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 4 deletions.
1 change: 1 addition & 0 deletions pdns/common_startup.cc
Expand Up @@ -107,6 +107,7 @@ void declareArguments()

::arg().setSwitch("slave","Act as a slave")="no";
::arg().setSwitch("master","Act as a master")="no";
::arg().setSwitch("disable-axfr-rectify","Disable the rectify step during an outgoing AXFR. Only required for regression testing.")="no";
::arg().setSwitch("guardian","Run within a guardian process")="no";
::arg().setSwitch("send-root-referral","Send out old-fashioned root-referral instead of ServFail in case of no authority")="no";
::arg().setSwitch("prevent-self-notification","Don't send notifications to what we think is ourself")="yes";
Expand Down
5 changes: 5 additions & 0 deletions pdns/docs/pdns.xml
Expand Up @@ -16214,6 +16214,11 @@ To enable a Lua script for a particular slave zone, determine the domain_id for
<listitem><para>
Do not allow zone transfers. Before 2.9.10, this could be overridden by allow-axfr-ips.
</para></listitem></varlistentry>
<varlistentry><term>disable-axfr-rectify=...</term>
<listitem><para>
Disable the rectify step during an outgoing AXFR. Only required for regression testing.
Default is no."/>.
</para></listitem></varlistentry>
<varlistentry><term>disable-tcp=...</term>
<listitem><para>
Do not listen to TCP queries. Breaks RFC compliance.
Expand Down
5 changes: 5 additions & 0 deletions pdns/pdns.conf-dist
Expand Up @@ -119,6 +119,11 @@
#
# disable-axfr=no

#################################
# disable-axfr-rectify Disable the rectify step during an outgoing AXFR. Only required for regression testing.
#
# disable-axfr-rectify=no

#################################
# disable-tcp Do not listen to TCP queries
#
Expand Down
2 changes: 1 addition & 1 deletion pdns/tcpreceiver.cc
Expand Up @@ -667,7 +667,7 @@ int TCPNameserver::doAXFR(const string &target, shared_ptr<DNSPacket> q, int out
}


const bool rectify = true; // TODO add config option
const bool rectify = !(presignedZone || ::arg().mustDo("disable-axfr-rectify"));
set<string> qnames, nsset, terms;
vector<DNSResourceRecord> rrs;

Expand Down
4 changes: 2 additions & 2 deletions regression-tests/backends/bind-master
Expand Up @@ -5,7 +5,7 @@ case $context in
--send-root-referral \
--allow-2136-from=127.0.0.0/8 --experimental-rfc2136=yes \
--cache-ttl=$cachettl --no-config --experimental-dname-processing \
--bind-ignore-broken-records=yes &
--bind-ignore-broken-records=yes --disable-axfr-rectify=yes &
skipreasons="nodnssec nodyndns nometa"
bindwait
;;
Expand Down Expand Up @@ -52,7 +52,7 @@ case $context in
--send-root-referral \
--allow-2136-from=127.0.0.0/8 --experimental-rfc2136=yes --direct-dnskey=yes \
--cache-ttl=$cachettl --no-config --experimental-dname-processing \
--bind-ignore-broken-records=yes $lua_prequery &
--bind-ignore-broken-records=yes --disable-axfr-rectify=yes $lua_prequery &
bindwait
;;

Expand Down
3 changes: 2 additions & 1 deletion regression-tests/backends/gsql-common
Expand Up @@ -34,7 +34,8 @@ gsql-master()
--config-name=$backend --socket-dir=./ --no-shuffle \
--send-root-referral \
--allow-2136-from=127.0.0.0/8 --experimental-rfc2136=yes \
--cache-ttl=$cachettl --experimental-dname-processing $lua_prequery &
--cache-ttl=$cachettl --experimental-dname-processing \
--disable-axfr-rectify=yes $lua_prequery &

if [ $context = ${backend}-nsec3 ]
then
Expand Down

0 comments on commit 5633a4a

Please sign in to comment.