lwIP - A Lightweight TCP/IP stack - Bugs: bug #19177, Faulty arp initialization in...
You are not allowed to post comments on this tracker with your current authentication level.
bug #19177: Faulty arp initialization in ethernetif_init skeleton
Submitter: | Thomas Taranowski <taranowski> | ||
Submitted: | Thu 01 Mar 2007 07:30:02 AM UTC | ||
Category: | ARP | Severity: | 3 - Normal |
Item Group: | Faulty Behaviour | Status: | Fixed |
Privacy: | Public | Assigned to: | fbernon |
Open/Closed: | Closed | Planned Release: | None |
lwIP version: | None |
Jump to the original submission
Mon 26 Mar 2007 04:19:45 PM UTC, comment #12: |
Frédéric Bernon <fbernon> |
Mon 26 Mar 2007 01:52:26 PM UTC, comment #11: Ok, I will call it from tcpip_init. It's also because others init (ip_init, udp_init & tcp_init) were moved from tcpip_thread to tcpip_init (I thought it solve some others developers problems, and more, it help to see which init functions use timers, and which don't use them).
|
Frédéric Bernon <fbernon> |
Mon 26 Mar 2007 01:45:47 PM UTC, comment #10: Re LWIP_ARP: fair enough.
|
Jonathan Larmour <jifl> |
Mon 26 Mar 2007 01:35:15 PM UTC, comment #9: Because ARP can also be used with Token Ring (and even if this protocol is not really supported now), I think that LWIP_ARP would be better. Ok to set it to 1 as default value.
|
Frédéric Bernon <fbernon> |
Mon 26 Mar 2007 01:19:21 PM UTC, comment #8: I think we may as well have the default as enabled (1) as it is the common case, was sort of already the default (as long as the user built the etharp module) and I guess one of the underlying netif interfaces should be enabled by default, so it can be that one. Just my opinion.
|
Jonathan Larmour <jifl> |
Mon 26 Mar 2007 01:17:39 PM UTC, comment #7: Yes, I think ARP should be optional code. |
Kieran Mansley <kieranm> |
Mon 26 Mar 2007 01:06:58 PM UTC, comment #6: Is it ok for others to add LWIP_ARP in opt.h to disable ARP code if you only use PPP&SLIP (and to set it to 0 par default)?
|
Frédéric Bernon <fbernon> |
Fri 23 Mar 2007 08:18:33 AM UTC, comment #5: For arp_timer, I will prefer a LWIP_ARP set to 0 in opts.h to match to other options (their names are LWIP_UDP, LWIP_TCP, ....).
|
Frédéric Bernon <fbernon> |
Fri 23 Mar 2007 07:04:50 AM UTC, comment #4: This patch is incorrect. PPP and SLIP users without ethernet interfaces should not have the ARP timer (and probably won't be building netif/etharp.c in the first place). That's why in the mail thread on lwip-users I was saying it would happen in the port's tcpip_init_done callback because the port knows whether there are any ethernet interfaces, and tcpip.c does not.
|
Jonathan Larmour <jifl> |
Mon 05 Mar 2007 11:30:48 AM UTC, comment #3: With these patchs, I think that ARP initialization and use is correct, except for driver. See some solutions in forum's thread "the ARP layer isnotprotectedagainstconcurrentaccess" (I will post a patch about that). If it's ok for others, I will integrate in CVS....
|
Frédéric Bernon <fbernon> |
Sat 03 Mar 2007 11:51:27 AM UTC, comment #2: I tend to agree with Frederic, and would remove the arp initialization from the ethernetif skeleton, in favor of sticking it in the tcpip_init_done() block. |
Thomas Taranowski <taranowski> |
Thu 01 Mar 2007 08:52:30 AM UTC, comment #1: I think that etharp_init() would have to be call before any net_add, because ARP Table is a global resource. Initialization sequence should be :
|
Frédéric Bernon <fbernon> |
Thu 01 Mar 2007 07:30:02 AM UTC, original submission:
The ethernetif_init skeleton executes the following code:
|
Thomas Taranowski <taranowski> |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 10 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2007-03-26 | fbernon | Status | None | Fixed | |
Open/Closed | Open | Closed | |||
2007-03-23 | jifl | Status | Fixed | None | |
Open/Closed | Closed | Open | |||
2007-03-06 | fbernon | Status | None | Fixed | |
Open/Closed | Open | Closed | |||
2007-03-05 | fbernon | Attached File | - | Added ethernetif.c.patch, #12113 | |
Attached File | - | Added tcpip.c.patch, #12114 | |||
2007-03-04 | fbernon | Assigned to | None | fbernon | |
2007-03-01 | taranowski | Attached File | - | Added ethernetif.patch, #12080 |
Powered by Savane 3.13-02a9.
Corresponding source code
Ok, I commit the new LWIP_ARP option. Note for developers: I don't have disable directly code in etharp.h/.c because some modules call them, and I don't know what should be a good behavior for them :
- snmp/mib2.c for ip_ntomentry_get_value() and atentry_get_value(),
- netif.c for netif_set_ipaddr() (in fact, the actual code for "gratuitous ARP" is disable).
- dhcp.c for dhcp_check()
I close this item, but reopen it if there is something wrong for you...