lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Etharp drops packets for unlisted arp entries


From: Leon Woestenberg
Subject: Re: [lwip-users] Etharp drops packets for unlisted arp entries
Date: Tue, 13 Jul 2004 23:05:38 +0200
User-agent: Mozilla Thunderbird 0.7.1 (Windows/20040626)

Tom,

Tom C. Barker wrote:

To confirm, I have 0.7.2. And my observation of my request being dropped
Your code fragment does not match the 0.7.2 source code from CVS. Please re-check.

/* i is available, create ARP entry */
arp_table[i].state = ETHARP_STATE_PENDING;
ip_addr_set(&arp_table[i].ipaddr, ipaddr);
/* queried address was already in ARP table */
} else {
#if ARP_QUEUEING
  etharp_enqueue(i, q);
#endif
}
There is no "} else {" in 0.7.2 (which has etharp.c 1.49.2.4).

This could explain the wrong behaviour you are experiencing. Please see that you are
using 0.7.2 or let me know if you think I am wrong in this.

For completeness, I have copied a snippet of code (from 0.7.2) below.

Regards,

Leon.



 /* queried address not yet in ARP table? */
 if (i == ARP_TABLE_SIZE) {
LWIP_DEBUGF(ETHARP_DEBUG | DBG_TRACE, ("etharp_query: IP address not found in ARP table\n"));
   /* find an available (unused or old) entry */
   i = find_arp_entry();
   /* bail out if no ARP entries are available */
   if (i == ERR_MEM) {
LWIP_DEBUGF(ETHARP_DEBUG | 2, ("etharp_query: no more ARP entries available. Should seldom occur.\n"));
     return ERR_MEM;
   }
   /* i is available, create ARP entry */
   arp_table[i].state = ETHARP_STATE_PENDING;
   ip_addr_set(&arp_table[i].ipaddr, ipaddr);
 }
 /* { i is now valid } */
#if ARP_QUEUEING /* queue packet (even on a stable entry, see above) */
 etharp_enqueue(i, q);
#endif






reply via email to

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