mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
netdev-linux: Only repair IP checksum in IPv4.
Previously a change was added to the vnet prepend code to solve for the
case where no L4 checksum offloading was needed but the L3 checksum
hadn't been calculated. But the added check didn't properly account
for IPv6 traffic.
Fixes: 85bcbbed83
("userspace: Enable tunnel tests with TSO.")
Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Mike Pattrick <mkp@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
This commit is contained in:
committed by
Ilya Maximets
parent
cb0cbffbe8
commit
a2d4ad651d
@@ -7199,10 +7199,11 @@ netdev_linux_prepend_vnet_hdr(struct dp_packet *b, int mtu)
|
||||
/* The packet has good L4 checksum. No need to validate again. */
|
||||
vnet->csum_start = vnet->csum_offset = (OVS_FORCE __virtio16) 0;
|
||||
vnet->flags = VIRTIO_NET_HDR_F_DATA_VALID;
|
||||
if (!dp_packet_ip_checksum_good(b)) {
|
||||
/* It is possible that L4 is good but the IP checksum isn't
|
||||
* complete. For example in the case of UDP encapsulation of an ARP
|
||||
* packet where the UDP checksum is 0. */
|
||||
|
||||
/* It is possible that L4 is good but the IPv4 checksum isn't
|
||||
* complete. For example in the case of UDP encapsulation of an ARP
|
||||
* packet where the UDP checksum is 0. */
|
||||
if (dp_packet_hwol_l3_csum_ipv4_ol(b)) {
|
||||
dp_packet_ip_set_header_csum(b, false);
|
||||
}
|
||||
} else if (dp_packet_hwol_tx_l4_checksum(b)) {
|
||||
|
Reference in New Issue
Block a user