netdev
[Top] [All Lists]

Re: UDP and Dest Unreachable, Port Unreachables

To: Dave Airlie <airlied@xxxxxxxxx>
Subject: Re: UDP and Dest Unreachable, Port Unreachables
From: Richard Sharpe <sharpe@xxxxxxxxxx>
Date: Tue, 20 Feb 2001 06:28:08 +1000
Cc: netdev@xxxxxxxxxxx
In-reply-to: <Pine.LNX.4.32.0102191849110.3768-100000@skynet>
References: <3.0.6.32.20010219215602.00856770@203.16.214.248>
Sender: owner-netdev@xxxxxxxxxxx
At 06:51 PM 2/19/01 +0000, Dave Airlie wrote:
>
>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..

No, I saw the packet go out, and the response come back, but I saw an ICMP
dest unreachable, port unreachable from the response. I thought there was a
read happening, and the port was in use, I believe, but perhaps there is a
funny timing window.

>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
>
>
>

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



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