mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jan Harkes <jaharkes@cs.cmu.edu>
To: Adam Denenberg <adam@dberg.org>
Cc: Jan Harkes <jaharkes@cs.cmu.edu>,
	Kyle Moffett <mrmacman_g4@mac.com>,
	linux-kernel@vger.kernel.org,
	Jan Engelhardt <jengelh@linux01.gwdg.de>
Subject: Re: bind() udp behavior 2.6.8.1
Date: Thu, 16 Dec 2004 09:51:38 -0500	[thread overview]
Message-ID: <20041216145138.GB8150@delft.aura.cs.cmu.edu> (raw)
In-Reply-To: <444EB40D-4F6E-11D9-91A1-003065B11AE8@dberg.org>

On Thu, Dec 16, 2004 at 09:24:59AM -0500, Adam Denenberg wrote:
> I disagree.  The linux server should be using unique Transaction ID's 
> in the dns header for each unique dns request.  Otherwise there is no 
> way to distinguish them (same A record request).  Of course the 
> firewall is going to drop a reply that it thinks it already saw a reply 
> for 30ms ago.
> 
> This appears to be a bug in the way glibc is handling things but i 
> cannot be sure.  That is the goal of my investigation.

Ok, please stop it and _read_ the email, completely, a possible solution
will be at the end.

This is not a problem with the linux kernel, the application (resolver
library) is simply retransmitting the request and the kernel does
exactly as it is told. So first of all this is completely off-topic for
linux-kernel.

Second of all, it is -not- a glibc issue either. The reply packet was
probably lost after it has passed through the firewall but before it
reached the DNS client machine. So since it has not yet received the
response it is doing the right thing, retransmitting the request.

The problem is... your firewall, it seems to assume that once it has
seen a UDP reply packet that this packet will reach the destination and
the session is closed. This is an incorrect assumption since UDP is per
definition a lossy protocol (unreliable datagram protocol) and the
packet can and will be dropped by any routers, switches, the network
card in your machine, or even by the kernel if there is too much
traffic or a single bit error which makes the checksum fail.

One solution that might work is to run a local caching DNS daemon on a
machine behind the firewall (bind, dnsmasq or something) and set
/etc/resolv.conf to only send requests to the local machine. The local
caching daemon can then forward those requests from a known fixed local
port to your upstream DNS servers. This allows you to open a hole in the
firewall between local_dns_cache:53 and upstream_dns_server:53.

Jan


  reply	other threads:[~2004-12-16 14:52 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-14 15:38 Adam Denenberg
2004-12-14 16:04 ` Jan Engelhardt
2004-12-14 16:42   ` Adam Denenberg
2004-12-14 16:44     ` Jan Engelhardt
2004-12-14 17:01       ` Adam Denenberg
2004-12-14 17:10         ` Jan Engelhardt
2004-12-14 17:38           ` Adam Denenberg
2004-12-14 17:49             ` Jan Engelhardt
2004-12-15  0:43             ` Wichert Akkerman
2004-12-16  5:49             ` Willy Tarreau
2004-12-14 22:07         ` Kyle Moffett
2004-12-15  2:23           ` Adam Denenberg
2004-12-15  3:19             ` Kyle Moffett
2004-12-15 14:16               ` Adam Denenberg
2004-12-15 19:07                 ` Jan Harkes
2004-12-15 19:22                   ` Adam Denenberg
2004-12-15 20:06                     ` linux-os
2004-12-15 20:19                       ` Adam Denenberg
2004-12-15 20:45                         ` Doug McNaught
2004-12-15 20:48                           ` Adam Denenberg
2004-12-15 20:57                             ` Doug McNaught
2004-12-16  6:10                     ` Willy Tarreau
2004-12-16 14:24                   ` Adam Denenberg
2004-12-16 14:51                     ` Jan Harkes [this message]
2004-12-16 15:00                       ` Adam Denenberg
2004-12-16  6:03             ` Willy Tarreau
2004-12-16 14:17               ` Adam Denenberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041216145138.GB8150@delft.aura.cs.cmu.edu \
    --to=jaharkes@cs.cmu.edu \
    --cc=adam@dberg.org \
    --cc=jengelh@linux01.gwdg.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mrmacman_g4@mac.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®