From 1f93a7dfd1f8d5ff7a5c53246c7534fe2332d6f4 Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Mon, 11 Dec 2023 02:46:07 +0000 Subject: [PATCH] add audio --- kernel/include/linux/virtio_net.h | 14 +++++++++++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/kernel/include/linux/virtio_net.h b/kernel/include/linux/virtio_net.h index 0e8ab43..a960de6 100644 --- a/kernel/include/linux/virtio_net.h +++ b/kernel/include/linux/virtio_net.h @@ -103,10 +103,18 @@ if (gso_type && skb->network_header) { struct flow_keys_basic keys; - if (!skb->protocol) - virtio_net_hdr_set_proto(skb, hdr); + if (!skb->protocol) { + __be16 protocol = dev_parse_header_protocol(skb); + + if (!protocol) + virtio_net_hdr_set_proto(skb, hdr); + else if (!virtio_net_hdr_match_proto(protocol, hdr->gso_type)) + return -EINVAL; + else + skb->protocol = protocol; + } retry: - if (!skb_flow_dissect_flow_keys_basic(skb, &keys, + if (!skb_flow_dissect_flow_keys_basic(NULL, skb, &keys, NULL, 0, 0, 0, 0)) { /* UFO does not specify ipv4 or 6: try both */ -- Gitblit v1.6.2