From: Aki Tuomi Date: Sun, 29 Mar 2015 21:37:27 +0000 (+0300) Subject: Log error when remote cannot do AXFR X-Git-Tag: auth-3.4.4~10^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2392%2Fhead;p=thirdparty%2Fpdns.git Log error when remote cannot do AXFR --- diff --git a/pdns/tcpreceiver.cc b/pdns/tcpreceiver.cc index b6afb9abf8..ddd9cf2221 100644 --- a/pdns/tcpreceiver.cc +++ b/pdns/tcpreceiver.cc @@ -530,8 +530,15 @@ int TCPNameserver::doAXFR(const string &target, shared_ptr q, int out s_P=new PacketHandler; } + if (!canDoAXFR(q)) { + L<getRemote()<<" cannot request AXFR"<setRcode(9); // 'NOTAUTH' + sendPacket(outpacket,outsock); + return 0; + } + // canDoAXFR does all the ACL checks, and has the if(disable-axfr) shortcut, call it first. - if(!canDoAXFR(q) || !s_P->getBackend()->getSOA(target, sd)) { + if(!s_P->getBackend()->getSOA(target, sd)) { L<setRcode(9); // 'NOTAUTH' sendPacket(outpacket,outsock);