From: Christian Hofstaedtler Date: Fri, 7 Oct 2016 00:42:56 +0000 (+0200) Subject: Replace setRcode(int) with setRcode(RCode::...) enum X-Git-Tag: dnsdist-1.1.0-beta2~88^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9c556f63f4812833ff9a3943ed43031ba84de5c7;p=pdns Replace setRcode(int) with setRcode(RCode::...) enum --- diff --git a/pdns/tcpreceiver.cc b/pdns/tcpreceiver.cc index 14a4e624f..cb20af3c0 100644 --- a/pdns/tcpreceiver.cc +++ b/pdns/tcpreceiver.cc @@ -556,7 +556,7 @@ int TCPNameserver::doAXFR(const DNSName &target, shared_ptr q, int ou if (!canDoAXFR(q)) { L<getRemote()<<" cannot request AXFR"<setRcode(9); // 'NOTAUTH' + outpacket->setRcode(RCode::NotAuth); sendPacket(outpacket,outsock); return 0; } @@ -564,7 +564,7 @@ int TCPNameserver::doAXFR(const DNSName &target, shared_ptr q, int ou // canDoAXFR does all the ACL checks, and has the if(disable-axfr) shortcut, call it first. if(!s_P->getBackend()->getSOAUncached(target, sd)) { L<setRcode(9); // 'NOTAUTH' + outpacket->setRcode(RCode::NotAuth); sendPacket(outpacket,outsock); return 0; } @@ -726,7 +726,7 @@ int TCPNameserver::doAXFR(const DNSName &target, shared_ptr q, int ou // now start list zone if(!(sd.db->list(target, sd.domain_id))) { L<setRcode(2); // 'SERVFAIL' + outpacket->setRcode(RCode::ServFail); sendPacket(outpacket,outsock); return 0; } @@ -751,7 +751,7 @@ int TCPNameserver::doAXFR(const DNSName &target, shared_ptr q, int ou int ret2 = stubDoResolve(getRR(zrr.dr)->d_content, QType::AAAA, ips); if(ret1 != RCode::NoError || ret2 != RCode::NoError) { L<getZoneRepresentation()<<", aborting AXFR"<setRcode(2); // 'SERVFAIL' + outpacket->setRcode(RCode::ServFail); sendPacket(outpacket,outsock); return 0; } @@ -1084,7 +1084,7 @@ int TCPNameserver::doIXFR(shared_ptr q, int outsock) // canDoAXFR does all the ACL checks, and has the if(disable-axfr) shortcut, call it first. if(!canDoAXFR(q) || !s_P->getBackend()->getSOAUncached(q->qdomain, sd)) { L<qdomain<<"' failed: not authoritative"<setRcode(9); // 'NOTAUTH' + outpacket->setRcode(RCode::NotAuth); sendPacket(outpacket,outsock); return 0; }