This patch fixes an uninitialized gso_type case in
netdev_linux_prepend_vnet_hdr() by returning an error.
Fixes: 3337e6d91c5b ("userspace: Enable L4 checksum offloading by default.")
Signed-off-by: Eelco Chaudron <[email protected]>
---
lib/netdev-linux.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
index eb0c5c624..7cffc0e13 100644
--- a/lib/netdev-linux.c
+++ b/lib/netdev-linux.c
@@ -7167,6 +7167,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 hw offload packet. "
+ "Flags: %"PRIu64,
+ (uint64_t)*dp_packet_ol_flags_ptr(b));
+ return EINVAL;
}
} else {
vnet->hdr_len = 0;
--
2.44.0
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev