ip: compute checksums before fragmentation if offloaded 91/42891/5
authorMohsin Kazmi <[email protected]>
Thu, 22 May 2025 19:34:42 +0000 (19:34 +0000)
committerMohsin Kazmi <[email protected]>
Thu, 5 Jun 2025 09:23:15 +0000 (09:23 +0000)
commitf8da64e60e9f536b62a82a415f04b277a35b3224
tree99cd6028595c65b2caf9dd02a4825544a0cfc44d
parent68efdff8e3ebfeee14401a628889801ab5bfe44b
ip: compute checksums before fragmentation if offloaded

Type: fix

When a packet with checksum offloading enabled is
fragmented into multiple IP fragments, due to the
egress interface's MTU being smaller than the original
packet size, it gets dropped after reassembly because
the reconstructed packet contains an invalid checksum.

This patch addresses the issue by computing the checksum
in the IP fragmentation logic before the packet is
fragmented, ensuring the resulting fragments carry a
valid checksum upon reassembly.

Signed-off-by: Mohsin Kazmi <[email protected]>
Change-Id: I202f169887ae9594f9580a4c7901d7b4483ef5f9
src/vnet/ip/ip_frag.c