buglwIP - A Lightweight TCP/IP stack - Bugs: bug #56288, IP forward problem with hardware...


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

bug #56288: IP forward problem with hardware and software checksum calculation interfaces

Submitted by:  Mehran Msba <msba>
Submitted on:  Wed 08 May 2019 12:12:10 PM UTC  
Category:  IPv4 Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  Fixed
Privacy:  Public Assigned to:  Simon Goldschmidt <goldsimon>
Open/Closed:  Closed Planned Release:  None
lwIP version:  2.0.2

Thu 30 Jan 2020 10:03:40 PM UTC, comment #2: 

Fixed by seting checksum fields of IP/UDP/TCP/ICMP to 0 in ip4_forward().

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Tue 14 May 2019 07:36:34 PM UTC, comment #1: 

Well, it seems the forwarding case just has been forgotten when adding the "hw checksum per interface" feature.

Care to provide a patch?

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Wed 08 May 2019 12:12:10 PM UTC, original submission:  

Test Conditions
0.IPv6 is not active
1.ETH interface with hardware checksum calculation
2.PPP over serial with software checksum calculation
3.These options are active:
#define IP_FORWARD                   1
#define CHECKSUM_GEN_IP      1
#define CHECKSUM_GEN_UDP     1
#define CHECKSUM_GEN_TCP     1
#define CHECKSUM_GEN_ICMP    1
#define CHECKSUM_CHECK_IP    1

4. Calculations set per interface:

Both interface work without problem But IP forward between these interfaces have checksum error.

for more details,Consider this scenario,

--------              -------------------                -------
| PC1  |---->ETH----->| Board with LWIP |----->PPPos---->| PC2 |
--------              -------------------                -------

PC1 configurations are  ,Gateway
PC2 configurations are,Gateway

report of connectivity check on PC1:
1. Ping    ->Reply OK
2. Ping  ->Reply OK
3. Ping  ->Reply Timeout

report of connectivity check on PC2:
1. Ping    ->Reply OK
2. Ping      ->Reply OK
3. Ping      ->Reply Timeout

I check Wire-shark logs and see the reply of other side,but checksum of this reply is 0,so the Ping is failed.

I set software checksum calculation in both interfaces and there is no problem at all.

I check the forward function too and I can not find any "if" statement for Hardware or software checksum calculation.

Mehran Msba <msba>


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 (Posted a comment)
  • -email is unavailable- added by msba (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-01-30 goldsimon StatusNone => Fixed
        Assigned toNone => goldsimon
        Open/ClosedOpen => Closed

    Back to the top

    Powered by Savane 3.5