netdev
[Top] [All Lists]

UDP and Dest Unreachable, Port Unreachables

To: netdev@xxxxxxxxxxx
Subject: UDP and Dest Unreachable, Port Unreachables
From: Richard Sharpe <sharpe@xxxxxxxxxx>
Date: Mon, 19 Feb 2001 21:56:02 +1000
Sender: owner-netdev@xxxxxxxxxxx
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



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