|
From: | steinarl |
Subject: | [lwip-users] ARP (was Re: Possible bug in src/api/tcpip.c) |
Date: | Fri, 16 May 2008 11:23:33 +0200 |
User-agent: | Internet Messaging Program (IMP) H3 (4.1.5) |
Rishi Khan wrote:So, if you call NETIF_FLAG_ETHARP, they you should leave the header alone, but if >> you don't call NETIF_FLAG_ETHARP, you should leave it there. Doesn't that seem weird? Why should the TCP/IP stack handle ARP? This is inherently an ethernet problem.
Just for better understanding, the handling of ARP packets has changed in 1.3.0: Previously they were indeed handled by the 'ethernetif' code. The problem was >that this way, the ARP table wasn't protected against concurrent access (from >receive thread an tcpip_thread - when sending). This was solved by letting the >tcpip_thread handle ARP packets, which is the reason why ethernet netifs have >to pass the complete packet, not only the IP part.
Simon
Leon Woestenberg had this suggestion in 2006: [RFC] Remove calls to etharp_ip_input().
(http://lists.nongnu.org/archive/html/lwip-devel/2006-04/msg00012.html)Is there a problem with concurrent writes to the ARP table in the approach he outlined?
Steinar
[Prev in Thread] | Current Thread | [Next in Thread] |