lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] Problem with UDP and ARP queuing


From: Mountifield, Tony
Subject: [lwip-devel] Problem with UDP and ARP queuing
Date: Wed, 18 Aug 2004 12:00:35 +0100

Hi All,
 
I think I've discovered a problem related to ARP Queuing and UDP. I haven't yet 
devised a fix, but thought I'd mention it so others could comment.
 
In udp_send() (udp.c:412) a separate pbuf is allocated to contain the UDP, IP 
and Eth headers, and the data pbuf is chained to it. Further down (line 468), 
this chain of two pbufs (q) is passed to ip_output_if() for transmission.
 
If the interface is Ethernet, this chain will eventually be passed to 
etharp_query(), and if the destination MAC is not known, will be queued on the 
pending ARP table entry.
 
Control unwinds back up to udp_send(), which, at line 492, frees the header 
pbuf which is still queued on the ARP table entry!
 
In my case it just so happens that a second UDP packet is soon sent by the 
application, and happens to get the SAME pbuf back for its header. When it gets 
down to etharp_query(), and the ARP is still unresolved, it is queued behind 
the existing queued chain, resulting in a pbuf loop!
 
I haven't started to look for the best solution yet, so I'd be delighted if 
anyone else has any good ideas.
 
It may be just that udp_send() has no reason to free the header pbuf, and we 
can remove that bit of code, but I don't know what else may rely on it.
 
Cheers
Tony
-- 
Tony Mountifield
Contractor @ Tandberg TV
Strategic Park, ext 3390
Tel: 023 8057 3390
 


***********************************************************************************
This email, its content and any attachments is PRIVATE AND
CONFIDENTIAL to TANDBERG Television. If received in error please
notify the sender and destroy the original message and attachments.

www.tandbergtv.com
***********************************************************************************





reply via email to

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