Skip to content

Instantly share code, notes, and snippets.

@Habbie
Created April 22, 2013 11:46
Show Gist options
  • Save Habbie/5434134 to your computer and use it in GitHub Desktop.
Save Habbie/5434134 to your computer and use it in GitHub Desktop.
fixes the mentioned axfr problems for me
Index: pdns/misc.cc
===================================================================
--- pdns/misc.cc (revision 924)
+++ pdns/misc.cc (working copy)
@@ -202,6 +202,10 @@
while (replen) {
ret = write(outsock, buffer, replen);
+ while(ret == -1 && errno == EAGAIN) {
+ Utility::usleep(1);
+ ret = write(outsock, buffer, replen);
+ }
if(ret < 0)
return ret;
if(!ret)
Index: pdns/tcpreceiver.cc
===================================================================
--- pdns/tcpreceiver.cc (revision 924)
+++ pdns/tcpreceiver.cc (working copy)
@@ -376,8 +376,11 @@
if(!((++count)%chunk)) {
count=0;
- if(sendDelPacket(outpacket, outsock)<0) // FIXME: this leaks memory!
- return 0;
+ if(sendDelPacket(outpacket, outsock)<0) {
+ // FIXME: this leaks memory!
+ L<<Logger::Error<<"AXFR of domain '"<<target<<"' to "<<q->getRemote()<<" FAILED during transmission"<<endl;
+ return 0;
+ }
outpacket=q->replyPacket();
outpacket->setCompress(false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment