2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00

netdev-linux: Fix uninitialized gso_type case.

This patch fixes an uninitialized gso_type case in
netdev_linux_prepend_vnet_hdr() by returning an error.

Fixes: 3337e6d91c ("userspace: Enable L4 checksum offloading by default.")
Acked-by: Ilya Maximets <i.maximets@ovn.org>
Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
This commit is contained in:
Eelco Chaudron
2024-05-29 12:53:33 +02:00
parent d97eee88e5
commit f2e4195b0c

View File

@@ -7174,6 +7174,11 @@ netdev_linux_prepend_vnet_hdr(struct dp_packet *b, int mtu)
vnet->gso_type = VIRTIO_NET_HDR_GSO_TCPV4;
} else if (dp_packet_hwol_tx_ipv6(b)) {
vnet->gso_type = VIRTIO_NET_HDR_GSO_TCPV6;
} else {
VLOG_ERR_RL(&rl, "Unknown gso_type for TSO packet. "
"Flags: %#"PRIx64,
(uint64_t) *dp_packet_ol_flags_ptr(b));
return EINVAL;
}
} else {
vnet->hdr_len = 0;