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: Zschocke, Florian
Subject: RE: [lwip-devel] lwIP UDP and TFTP
Date: Wed, 26 Nov 2003 08:25:28 +0100

Atte Kojo wrote on Wednesday, November 26, 2003 8:01 AM:

> Also RFC 768 states that the source port field is optional
> (actually the field itself is mandatory but it doesn't have to
> contain any information) in UDP header so it shouldn't be
> checked when trying to match incoming UDP packets to an
> existing pcb. 

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


Florian





reply via email to

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