This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: bug in ARP FSM with fragmented packets?


On Mon, Jan 21, 2008 at 12:18:16PM +0100, J?rgen Lambrecht wrote:
> Hello,
>
> I'm investigating a problem where UDP packets get lost when there is an  
> ARP table timeout.
> - It only happens with UDP, not with TCP; IPv4.
> - It only happens with fragmented IP packets, so with UDP packets bigger  
> than the Ethernet MTU of 1518 Bytes.
> - I use freeBSD stack, version from CVS end 2007
> This is what I see with Ethereal: The application receives a UDP request  
> packet, and must send back a UDP reply packet. Instead an ARP  
> request/reply happens, and the packet gets lost.
>
> Using static ARP table entries solves the problem of course, but that is  
> not acceptable.
>
> Has anybody seen such a problem before?
> Or has anybody a clue where to start looking?

First off, is this really a bug? UDP is unreliable. It is allowed to
drop packets. If the application requires reliable packet transfer, it
must perform retries at the application layer.

It is a while since i looked at the ARP code. However, i think it will
hold onto one IP packet when it needs to make an ARP request. Once the
ARP reply comes back it will send the packet it held. If more transmit
requests are made before it has the ARP reply it discards
packets. This fits your description. Your big UDP packet is being
fragmented, causing two or more packets to be sent, of which all but
one gets discarded.

If you really must change this, you need to implement a list of
packets, not a single packet.

However, in my view, your application is broken, not ARP.

         Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]