dns.c: Increase DNS packet buffer to 64K.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 8 Apr 2010 08:36:40 +0000 (09:36 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Tue, 27 Apr 2010 12:56:25 +0000 (13:56 +0100)
Otherwise qmail-remote fails on sites that return more than 512 bytes of
stuff to ANY queries, and you get bounces.  We have a sufficiently
recent resolver library that it will automatically fall back to TCP to
fill the buffer, and 64K per outgoing message is not a big deal.

debian/changelog
dns.c

index 6d7a1eb..dc85763 100644 (file)
@@ -1,3 +1,9 @@
+qmail (1.03-6) experimental; urgency=low
+
+  * Fix qmail-remote to not fail on oversize DNS replies
+
+ -- Mark Wooding <mdw@distorted.org.uk>  Thu, 08 Apr 2010 09:40:31 +0100
+
 qmail (1.03-5) unstable; urgency=low
 
   * make it build again.
diff --git a/dns.c b/dns.c
index ed42787..d034382 100644 (file)
--- a/dns.c
+++ b/dns.c
@@ -21,7 +21,7 @@ extern int h_errno;
 static unsigned short getshort(c) unsigned char *c;
 { unsigned short u; u = c[0]; return (u << 8) + c[1]; }
 
-static union { HEADER hdr; unsigned char buf[PACKETSZ]; } response;
+static union { HEADER hdr; unsigned char buf[65536]; } response;
 static int responselen;
 static unsigned char *responseend;
 static unsigned char *responsepos;