From ddd426ff7e5d8a25ef776f2b12de503a77159388 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Thu, 8 Apr 2010 09:36:40 +0100 Subject: [PATCH] dns.c: Increase DNS packet buffer to 64K. 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 | 6 ++++++ dns.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 6d7a1eb..dc85763 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +qmail (1.03-6) experimental; urgency=low + + * Fix qmail-remote to not fail on oversize DNS replies + + -- Mark Wooding 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 --- 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; -- 2.11.0