lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [lwip-devel] lwIP UDP and TFTP


From: Atte Kojo
Subject: RE: [lwip-devel] lwIP UDP and TFTP
Date: Wed, 26 Nov 2003 10:25:39 +0200

On Wed, 2003-11-26 at 09:25, Zschocke, Florian wrote:
> That is not completely correct. In the case of a connected UDP socket you
> will have to check the source port against the foreign port that the socket
> is connected to. So the patch should instead read:
> 
>  /* PCB remote port matches UDP source port for connected socket? */
>  if(((pcb->flags&UDP_FLAGS_CONNECTED)?(pcb->remote_port == src):1)&&
>    /* PCB local port matches UDP destination port? */
>    (pcb->local_port == dest) &&

This doesn't solve the problem with TFTP as the socket is connected to
port 69 when sending the request. When the response arrives from the
server (from a different port) it gets rejected (the UDP_FLAGS_CONNECTED
is set and ports don't match).

Furher thinking about the issue, the whole concept of a "connection" in
case of UDP is erroneous. As UDP is a connectionless protocol the stack
should _not_ be worried about where the packets come from. To repeat
myslef: Sending and receiving UDP packets are two totally different
operations; they shouldn't have anything to do with each other.

-- 
CChheecckk yyoouurr dduupplleexx sswwiittcchh..





reply via email to

[Prev in Thread] Current Thread [Next in Thread]