On 29 May 2024, at 12:53, Eelco Chaudron wrote:

> 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 | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
> index eb0c5c624..dc67e1268 100644
> --- a/lib/netdev-linux.c
> +++ b/lib/netdev-linux.c
> @@ -7167,6 +7167,10 @@ 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;
> -- 
> 2.44.0

Recheck-request: github-robot

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

Reply via email to