netdev
[Top] [All Lists]

Re: UDP and Dest Unreachable, Port Unreachables

To: Richard Sharpe <sharpe@xxxxxxxxxx>
Subject: Re: UDP and Dest Unreachable, Port Unreachables
From: Dave Airlie <airlied@xxxxxxxxx>
Date: Mon, 19 Feb 2001 18:51:34 +0000 (GMT)
Cc: <netdev@xxxxxxxxxxx>
In-reply-to: <3.0.6.32.20010219215602.00856770@203.16.214.248>
Sender: owner-netdev@xxxxxxxxxxx
Hi Richard,

This is just a guess from the outside, but Linux reports UDP errors on the
next socket operation I think, so if the UDP datagram you send fails, the
error will come back on the next select..

Does tcpdump see a reply?

Dave.

On Mon, 19 Feb 2001, Richard Sharpe wrote:

> Hi Alan,
>
> I am doing some work with Samba which involves sending a UDP datagram and
> waiting for a response from a Samba or Windows server.
>
> Every now and then, I get a timeout on the socket I am waiting for input
> from (atcually in a select statement) and I see, in the trace, that the
> Linux machine responds with a Dest Unreach, Port Unreach when the timeout
> occurs.
>
> Now, the way I do this is:
>
>   Open socket and specify a local address (INADDR_ANY, port=138), and
> remote address (some IP and port =138).
>
>   Construct and send the packet using the socket above
>
>   Call routine to wait for input on socked above.
>
> I wonder what the actual semantics are for receiving UDP datagams? Will the
> kernel receive datagrams if a socket is open with the appropriate SIP,
> SPort, DIP, DPORT combination, or, does there have to be a read scheduled,
> either via a select, or an actual read?
>
> I find this problem on 2.2.18 and 2.4.0.
>
> It seems unlikely to be a bug, but I cannot think of a set of circumstances
> that may cause this behaviour?
>
> Can anyone see what the problem might be?
>
> Regards
> -------
> Richard Sharpe, sharpe@xxxxxxxxxx
> Samba (Team member, www.samba.org), Ethereal (Team member, www.ethereal.com)
> Contributing author, SAMS Teach Yourself Samba in 24 Hours
> Author, Special Edition, Using Samba
>
>
>

-- 
David Airlie, Software Engineer
http://www.skynet.ie/~airlied / airlied@xxxxxxxxx
pam_smb / Linux DecStation / Linux VAX / ILUG person



<Prev in Thread] Current Thread [Next in Thread>