Re: CNAME Lookup failure for MX microsoft.com

Mark Johnson <[email protected]>
Newsgroups gmane.network.djbdns
Message-ID <[email protected]>
On Tue, Feb 3, 2009 at 11:59 AM, Emilio Perea <[email protected]> wrote:
> On Tue, Feb 03, 2009 at 11:16:52AM +0100, Erwin Hoffmann wrote:
>> I did a little investigation, and it turned out to be the 'oversized' UDP
>> packet problem.
>>
>> Obviously, at least one of the queried NS sends oversized packets.
>>
>> Changing udpbuf to 4096 in dns_transmit.c solves (or at least relaxes) the
>> problem.
>>
>> Comments ?
>
> There was a thread about this last year.  The first proposed solution
> was to change to TCP when this happened:
>
> *----------------------------------------------------------------------*
> --- dns_transmit.c~     2008-01-09 00:50:09.559806518 +0200
> +++ dns_transmit.c      2008-10-06 14:16:28.539802762 +0300
> @@ -352,7 +352,7 @@ have sent query to curserver on UDP sock
>       if (errno == error_connrefused) if (d->udploop == 2) return 0;
>       return nextudp(d);
>     }
> -    if (r + 1 > sizeof udpbuf) return 0;
> +    if (r + 1 > sizeof udpbuf) return firsttcp(d);
>
>     if (irrelevant(d,udpbuf,r)) return 0;
>     if (serverwantstcp(udpbuf,r)) return firsttcp(d);
> *----------------------------------------------------------------------*
>
> A bit later Someone suggested the same solution you came up with:
>
> *----------------------------------------------------------------------*
> --- dns_transmit.c.orig 2008-10-10 16:59:03.000000000 -0700
> +++ dns_transmit.c      2008-10-10 16:59:11.000000000 -0700
> @@ -240,7 +240,7 @@
>
>  int dns_transmit_get(struct dns_transmit *d,const iopause_fd *x,const
> struct taia *when)
>  {
> -  char udpbuf[513];
> +  char udpbuf[4097];
>   unsigned char ch;
>   int r;
>   int fd;
> *----------------------------------------------------------------------*
>
> That's what I'm using myself, and have not noticed any drawbacks.

Here's the first post in the thread:

http://marc.info/?l=djbdns&m=122329096516302&w=2

From reading the thread, I'd tend to go with the 2nd solution
(enlarging udpbuf).  I'll probably toss that into my next release.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.