lwIP - A Lightweight TCP/IP stack - Patches: patch #7264, protocols are rejected incorrectly...
You are not allowed to post comments on this tracker with your current authentication level.
patch #7264: protocols are rejected incorrectly on big endian architectures
Submitter: | Greg Renda <greg> | ||
Submitted: | Fri 30 Jul 2010 11:27:02 PM UTC | ||
Category: | None | Priority: | 5 - Normal |
Status: | Done | Privacy: | Public |
Assigned to: | goldsimon | Open/Closed: | Closed |
Planned Release: | None |
Sun 01 Aug 2010 11:15:51 AM UTC, comment #3: |
Simon Goldschmidt <goldsimon> |
Sat 31 Jul 2010 03:44:52 PM UTC, comment #2: Yes, I actually observed this bug. The reason the value is no longer there is this line near the top of the function:
|
Greg Renda <greg> |
Sat 31 Jul 2010 06:18:33 AM UTC, comment #1: Did you really observe that bug or did you report it from reading the code? Because from my reading the code, the value should still be there (at nb->payload): nb is untouched in case default unless we find a matching protocol, but in that case, the code you want to be changed is not reached.
|
Simon Goldschmidt <goldsimon> |
Fri 30 Jul 2010 11:27:02 PM UTC, original submission:
An unrecognized protocol isn't rejected properly when BYTE_ORDER != LITTLE_ENDIAN. The protocol id isn't copied into the output buffer.
|
Greg Renda <greg> |
No files currently attached
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 4 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2010-08-01 | goldsimon | Status | Need Info | Done | |
Assigned to | None | goldsimon | |||
Open/Closed | Open | Closed | |||
2010-07-31 | goldsimon | Status | None | Need Info |
Powered by Savane 3.13-f8d8.
Corresponding source code
Ah, well, I just discovered my mistake: I thought that the protocol was to be copied to the same memory where it is read from at the top of the function, however, that's not the case as the struct has a padding of 2 on platforms where 'int' is 4 bytes and which need 4-byte alignment.
So we either would need to pack the struct pppInputHeader to make the code work like the original author meant it to work or just apply your patch, which is what I jsut did.
Thanks for reporting.