Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net: fix TCP/UDP checksum with padding data
[ upstream commit e55ea3d5d970dfff2989e4a1c65b76d02512bce0 ] IEEE 802 packets may have a minimum size limit. The data fields should be padded when necessary. In some cases, the padding data is not zero. In 'rte_ipv4_udptcp_cksum_mbuf()', as payload length "mbuf->pkt_len - l4_off" is used, which includes padding and if padding is not zero it will end up producing wrong checksum. This patch will use IP header to get the payload size to calculate TCP/UDP checksum. Fixes: d178f69 ("net: add UDP/TCP checksum in mbuf segments") Signed-off-by: Kaiwen Deng <kaiwenx.deng@intel.com> Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
- Loading branch information