and now the real fix Re: [Pdns-users] axfr fix for pdns 2.9.18

bert hubert bert.hubert at netherlabs.nl
Wed Aug 17 19:27:09 UTC 2005


Sigh.. Please find attached the *real* fix. If you already applied the
patch, please start from a clean tar.gz.

Thanks to Wouter for helping debug this problem.

On Tue, Aug 16, 2005 at 07:41:01PM +0200, bert hubert wrote:
> Hi,
> 
> PowerDNS 2.9.18 broke incoming zone transfers from certain remote master
> servers, the patch on http://ds9a.nl/pdns/fix-axfr-diff fixes that problem.
> If you see errors like: 
> 
>  Unable to AXFR zone 'some-domain.nl': resolver: unable to parse packet of 43
>  bytes'
> 
> consider applying, and run the following in the directory containing
> dnspacket.hh :
> 
> $ patch < fix-axfr-diff
> 
> And recompile.
> 
> 2.9.18.1, to be released in the coming days, will fix this as well. Let me
> know if this patch solves your problem.
> 
> Thanks.
> 
> -- 
> http://www.PowerDNS.com      Open source, database driven DNS Software 
> http://netherlabs.nl              Open and Closed source services
> _______________________________________________
> Pdns-users mailing list
> Pdns-users at mailman.powerdns.com
> http://mailman.powerdns.com/mailman/listinfo/pdns-users
> 
> 
> !DSPAM:43022554286381631213794!

-- 
http://www.PowerDNS.com      Open source, database driven DNS Software 
http://netherlabs.nl              Open and Closed source services
-------------- next part --------------
Index: dnspacket.hh
===================================================================
--- dnspacket.hh	(revision 456)
+++ dnspacket.hh	(working copy)
@@ -297,12 +297,17 @@
 
   int offset=0;
   d_qlen=0;
+
   if(!ntohs(d.qdcount)) {
-    L << Logger::Warning << "No question section in packet from " << getRemote() <<", rcode="<<(int)d.rcode<<endl;
-    return -1;
+    if(!d_tcp) {
+      L << Logger::Warning << "No question section in packet from " << getRemote() <<", rcode="<<(int)d.rcode<<endl;
+      return -1;
+    }
   }
-
-  offset = getq(); // also sets this->qdomain!
+  else {
+    offset = getq(); // also sets this->qdomain!
+    d_qlen=offset+4; // this points to the start of any answers
+  }
   if(offset < 0) {
     //    L << Logger::Warning << "Ignoring packet: invalid label in question from "
     //  << inet_ntoa(remote.sin_addr) << endl;
@@ -312,7 +317,7 @@
     return -1;
   }
 
-  d_qlen=offset+4; // this points to the start of any answers
+
   
   if((unsigned int)(15+offset)>=stringbuffer.length()) {
     L << Logger::Warning << "Ignoring packet: question too short from "<< getRemote()<<", offset "<<


More information about the Pdns-users mailing list