This patch fixes a uninitialized gso_type case in
netdev_linux_prepend_vnet_hdr().

Fixes: 3337e6d91c5b ("userspace: Enable L4 checksum offloading by default.")
Signed-off-by: Eelco Chaudron <[email protected]>
---
 lib/netdev-linux.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
index eb0c5c624..239dc3299 100644
--- a/lib/netdev-linux.c
+++ b/lib/netdev-linux.c
@@ -7142,7 +7142,8 @@ netdev_linux_prepend_vnet_hdr(struct dp_packet *b, int 
mtu)
     struct virtio_net_hdr v;
     struct virtio_net_hdr *vnet = &v;
 
-    if (dp_packet_hwol_is_tso(b)) {
+    if (dp_packet_hwol_is_tso(b)
+        && (dp_packet_hwol_is_ipv4(b) || dp_packet_hwol_tx_ipv6(b))) {
         uint16_t tso_segsz = dp_packet_get_tso_segsz(b);
         struct tcp_header *tcp = dp_packet_l4(b);
         struct tcp_header *inner_tcp = dp_packet_inner_l4(b);
-- 
2.44.0

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to