From: Kees Monshouwer Date: Thu, 17 Apr 2014 22:05:10 +0000 (+0200) Subject: add disable-axfr-rectify config option X-Git-Tag: rec-3.6.0-rc1~28^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5633a4afafafeb45f3d4e47d0c2ebbc938face37;p=thirdparty%2Fpdns.git add disable-axfr-rectify config option --- diff --git a/pdns/common_startup.cc b/pdns/common_startup.cc index eb8cd0db2a..b8e144ef22 100644 --- a/pdns/common_startup.cc +++ b/pdns/common_startup.cc @@ -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"; diff --git a/pdns/docs/pdns.xml b/pdns/docs/pdns.xml index aeabf9a75b..7b15a0552d 100644 --- a/pdns/docs/pdns.xml +++ b/pdns/docs/pdns.xml @@ -16214,6 +16214,11 @@ To enable a Lua script for a particular slave zone, determine the domain_id for Do not allow zone transfers. Before 2.9.10, this could be overridden by allow-axfr-ips. + disable-axfr-rectify=... + + Disable the rectify step during an outgoing AXFR. Only required for regression testing. + Default is no."/>. + disable-tcp=... Do not listen to TCP queries. Breaks RFC compliance. diff --git a/pdns/pdns.conf-dist b/pdns/pdns.conf-dist index a41c136c2e..08c4758359 100644 --- a/pdns/pdns.conf-dist +++ b/pdns/pdns.conf-dist @@ -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 # diff --git a/pdns/tcpreceiver.cc b/pdns/tcpreceiver.cc index 32481d28dc..5483db1f0e 100644 --- a/pdns/tcpreceiver.cc +++ b/pdns/tcpreceiver.cc @@ -667,7 +667,7 @@ int TCPNameserver::doAXFR(const string &target, shared_ptr q, int out } - const bool rectify = true; // TODO add config option + const bool rectify = !(presignedZone || ::arg().mustDo("disable-axfr-rectify")); set qnames, nsset, terms; vector rrs; diff --git a/regression-tests/backends/bind-master b/regression-tests/backends/bind-master index f5a061309d..172edc82bb 100644 --- a/regression-tests/backends/bind-master +++ b/regression-tests/backends/bind-master @@ -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 ;; @@ -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 ;; diff --git a/regression-tests/backends/gsql-common b/regression-tests/backends/gsql-common index 300f4a8574..418581d0cb 100644 --- a/regression-tests/backends/gsql-common +++ b/regression-tests/backends/gsql-common @@ -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