buglwIP - A Lightweight TCP/IP stack - Bugs: bug #55030, Ethernet SAP stored backwards on...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #55030: Ethernet SAP stored backwards on Big endian system ?

Submitter:  Ivan Warren <ivanw>
Submitted:  Thu 15 Nov 2018 03:31:58 PM UTC
   
 
Category:  Platform ports Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  Invalid
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Planned Release:  None
lwIP version:  git head

Thu 15 Nov 2018 06:45:39 PM UTC, comment #2: 

Please close as invalid.. I had forgotten to define BYTE_ORDER in my cc.h ! Sorry for the inconvenience.

Ivan Warren <ivanw>
Thu 15 Nov 2018 06:28:14 PM UTC, comment #1: 

Issue is not in ethernet_output... By inserting debugging code, it's already swapped (the last parameter - the ether type is already 0x0008 instead of 0x0800).. Odd enough all the calls seem to indicate a fixed ETHTYPE_IP value (of 0x0800U).. I'm baffled ;) But I'm looking

Ivan Warren <ivanw>
Thu 15 Nov 2018 03:31:58 PM UTC, original submission:  

On my big endian system, I'm getting the following (for frames sent by LWIP - in this case the DHCP client) :

LCS : 0000 : 01620100 FFFFFFFF FFFFFA40 4BB43CE8 00084500 50010000 0000FF11 9DBA0000
LCS : 0020 : 0000FFFF FFFF4400 43003C01 DCAC0101 06008127 00000000 00000000 00000000
LCS : 0040 : 00000000 00000000 0000FA40 4BB43CE8 00000000 00000000 00000000 00000000
LCS : 0060 : 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
LCS : 0080 : 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
LCS : 00A0 : 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
LCS : 00C0 : 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
LCS : 00E0 : 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
LCS : 0100 : 00000000 00000000 00000000 00000000 00000000 00000000 00006353 82633501
LCS : 0120 : 01390205 DC370401 031C06FF 00000000 00000000 00000000 00000000 00000000
LCS : 0140 : 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

(This a is debug dump from my network interface driver... Ignore the 1st 4 bytes, they are for the output hardware).

The problem is : The SAP field (ETH Frame + 12 is inverted ! It should be 0800 (IP), not 0008 - making it a 802.3 Frame of length 8).

I somehow suspect that this field was inverted somewhere, but I cannot make out where it could happen. (htons and PP_HTONS should be good)

Ivan Warren <ivanw>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Updated the item)
  • -email is unavailable- added by ivanw (Submitted the item)
  •  

    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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-11-15 goldsimon StatusNone Invalid
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code