lwIP - A Lightweight TCP/IP stack - Bugs: bug #8708, Fix for IP and TCP header...
You are not allowed to post comments on this tracker with your current authentication level.
bug #8708: Fix for IP and TCP header alignment with Ethernet
Submitter: | None | ||
Submitted: | Tue 27 Apr 2004 03:33:10 PM UTC | ||
Category: | pbufs | Severity: | 3 - Normal |
Item Group: | Faulty Behaviour | Status: | Fixed |
Privacy: | Public | Assigned to: | likewise |
Open/Closed: | Closed | Planned Release: | None |
lwIP version: | None |
Thu 29 Apr 2004 09:38:08 AM UTC, comment #3: |
Tony Mountifield <softins> |
Wed 28 Apr 2004 11:04:07 AM UTC, comment #2: A further correction is required in etharp.c when compiling with debug enabled. See the second patch file, just added. |
Tony Mountifield <softins> |
Tue 27 Apr 2004 03:38:36 PM UTC, comment #1: Actually submitted by softins, but forgot to log in first. |
Tony Mountifield <softins> |
Tue 27 Apr 2004 03:33:10 PM UTC, original submission:
On 32-bit processors that cannot do unaligned accesses, there are problems with 32-bit values in the IP and TCP headers, due to their being preceded by an ethernet header of 14 bytes.
|
Anonymous |
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 7 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2004-04-29 | softins | Attached File | - | Added etherpad3.patch, #1252 | |
2004-04-28 | likewise | Category | None | pbufs | |
Status | None | Fixed | |||
Assigned to | None | likewise | |||
Open/Closed | Open | Closed | |||
2004-04-28 | softins | Attached File | - | Added etherpad2.patch, #1249 | |
2004-04-27 | None | Attached File | - | Added etherpad.patch, #1240 |
Powered by Savane 3.13-02a9.
Corresponding source code
The etherpad2.patch file should not be applied after all. Instead, apply etherpad3.patch, which addresses the following:
There was another unaligned access that was masked from the compiler by the cast in the macro ip_addr_set. Removing the cast of (src) catches this error and doesn't reveal any others, indicating that the cast is no longer needed.
The second param of update_arp_entry() is now reverted from (struct ip_addr2 ) back to (struct ip_addr ), and update_arp_entry() is mostly reverted to what it was. Instead, etharp_arp_input() takes copies of sipaddr and dipaddr and passes those. This removes the calls to memcmp() and also helps dhcp_arp_reply().
The loops through the ARP table in update_arp_entry() and etharp_query() should test that the entry is not empty before comparing its address.
The etherpad3.patch is against CVS as at 29-Apr-04.