Skip to content

Instantly share code, notes, and snippets.

@Habbie
Created April 26, 2013 11:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Habbie/5466610 to your computer and use it in GitHub Desktop.
Save Habbie/5466610 to your computer and use it in GitHub Desktop.
Index: pdns/qtype.cc
===================================================================
--- pdns/qtype.cc (revision 998)
+++ pdns/qtype.cc (working copy)
@@ -59,6 +59,7 @@
insert("A6",38);
insert("NAPTR",35);
insert("SPF",99);
+ insert("IXFR",251);
insert("AXFR",252);
insert("ANY",255);
insert("URL",256);
Index: pdns/tcpreceiver.cc
===================================================================
--- pdns/tcpreceiver.cc (revision 998)
+++ pdns/tcpreceiver.cc (working copy)
@@ -268,7 +268,7 @@
if(packet->parse(mesg, pktlen)<0)
break;
- if(packet->qtype.getCode()==QType::AXFR) {
+ if(packet->qtype.getCode()==QType::AXFR || packet->qtype.getCode()==QType::IXFR) {
if(doAXFR(packet->qdomain, packet, fd))
S.inc("tcp-answers");
continue;
@@ -363,7 +363,10 @@
sendPacket(outpacket,outsock);
return 0;
}
- L<<Logger::Error<<"AXFR of domain '"<<target<<"' initiated by "<<q->getRemote()<<endl;
+ if (q->qtype.getCode()==QType::AXFR)
+ L<<Logger::Error<<"AXFR of domain '"<<target<<"' initiated by "<<q->getRemote()<<endl;
+ else
+ L<<Logger::Error<<"IXFR(fallback to AXFR) of domain '"<<target<<"' initiated by "<<q->getRemote()<<endl;
outpacket=shared_ptr<DNSPacket>(q->replyPacket());
DNSResourceRecord soa;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment