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: Tom C. Barker
Subject: RE: [lwip-users] Etharp drops packets for unlisted arp entries
Date: Tue, 13 Jul 2004 14:20:15 -0700

Yep, I had just created a response to you with what I found 
to be a solution (my solution is the same as the 0.7.2 code). 
sorry for the confusion: it looks like I missed this change 
when I ported from 0.7.1 ( or .0 ). 

Thanks for your help Leon!

Tom



-----Original Message-----
From: address@hidden
[mailto:address@hidden Behalf
Of Leon Woestenberg
Sent: Tuesday, July 13, 2004 2:06 PM
To: Mailing list for lwIP users
Subject: Re: [lwip-users] Etharp drops packets for unlisted arp entries


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

 


_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users




reply via email to

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