lwip-devel
[Top][All Lists]
Advanced

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

RE: [lwip-devel] Problem with UDP and ARP queuing


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

Following up again:

> After further thought, an idea:
> 
> > 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.
> 
> Perhaps it is a reference-counting issue. Does/should 
> etharp_query increment a reference count in the chain/packet 
> when queuing it on an ARP table entry? And then of course 
> decrement it when dequeuing.

I think the following is certainly needed, but we will need to make sure there 
is a pbuf_free() in the right place (there may already be) to avoid a pbuf leak:

Index: src/netif/etharp.c
===================================================================
RCS file: /cvsroot/lwip/lwip/src/netif/etharp.c,v
retrieving revision 1.80
diff -u -r1.80 etharp.c
--- src/netif/etharp.c  17 Aug 2004 08:39:43 -0000      1.80
+++ src/netif/etharp.c  18 Aug 2004 11:19:14 -0000
@@ -755,6 +755,7 @@
         /* queue packet ... */
         if (arp_table[i].p == NULL) {
                /* ... in the empty queue */
+               pbuf_ref(p);
                arp_table[i].p = p;
         } else {
                /* ... at tail of non-empty queue */

Cheers
Tony


***********************************************************************************
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]