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

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Wilfred
URL:
  <https://savannah.nongnu.org/bugs/?56288>

                 Summary: IP forward problem with hardware and software
checksum calculation interfaces
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: msba
            Submitted on: Wed 08 May 2019 12:12:10 PM UTC
                Category: IPv4
                Severity: 3 - Normal
              Item Group: Faulty Behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
            lwIP version: 2.0.2

    _______________________________________________________

Details:

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 LWIP_CHECKSUM_CTRL_PER_NETIF 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
#define CHECKSUM_CHECK_UDP   1
#define CHECKSUM_CHECK_TCP   1
#define CHECKSUM_CHECK_ICMP  1

4. Calculations set per interface:
  NETIF_SET_CHECKSUM_CTRL(&ethNetif,NETIF_CHECKSUM_DISABLE_ALL);
  NETIF_SET_CHECKSUM_CTRL(&ppposNetif,NETIF_CHECKSUM_ENABLE_ALL);
 
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 |
--------              -------------------                -------
                 192.168.0.1/24   192.168.125.1/24

PC1 configurations are 192.168.0.2/24  ,Gateway 192.168.0.1
PC2 configurations are 192.168.125.2/24,Gateway 192.168.125.1

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

report of connectivity check on PC2:
1. Ping 192.168.125.1    ->Reply OK
2. Ping 192.168.0.1      ->Reply OK
3. Ping 192.168.0.2      ->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.






    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?56288>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

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

Wilfred
Follow-up Comment #1, bug #56288 (project lwip):

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

Care to provide a patch?

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?56288>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel