});
static bool mustNotShuffle = ::arg().mustDo("no-shuffle");
- if(!d_tcp && !mustNotShuffle) {
+ if(!d_xfr && !mustNotShuffle) {
pdns::shuffle(d_rrs);
}
d_wrapped=true;
r->d_haveednscookie = d_haveednscookie;
r->d_ednsversion = 0;
r->d_ednsrcode = 0;
+ r->d_xfr = d_xfr;
if(d_tsigkeyname.countLabels()) {
r->d_tsigkeyname = d_tsigkeyname;
uint16_t qclass{QClass::IN}; //!< class of the question - should always be INternet 2
QType qtype; //!< type of the question 2
- bool d_tcp{false};
+ bool d_tcp{false}; // whether DNS packet is using TCP (false when UDP)
+ bool d_xfr{false}; // whether DNS packet is a zone transfer, either AXFR or IXFR
bool d_dnssecOk{false};
bool d_havetsig{false};
S.inc("tcp-cookie-queries");
if(packet->qtype.getCode()==QType::AXFR) {
+ packet->d_xfr=true;
doAXFR(packet->qdomain, packet, fd);
continue;
}
if(packet->qtype.getCode()==QType::IXFR) {
+ packet->d_xfr=true;
doIXFR(packet, fd);
continue;
}