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
|