diff options
author | David S. Miller <davem@davemloft.net> | 2019-02-20 03:34:07 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-02-20 03:34:07 -0500 |
commit | 375ca548f7e3ac82acdd0959eddd1fa0e17c35cc (patch) | |
tree | 5360dc427e4eff7123613419ee522b7fda831de0 /include/linux/virtio_net.h | |
parent | 58066ac9d7f5dcde4ef08c03b7e127f0522d9ea0 (diff) | |
parent | 40e196a906d969fd10d885c692d2674b3d657006 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Two easily resolvable overlapping change conflicts, one in
TCP and one in the eBPF verifier.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/virtio_net.h')
-rw-r--r-- | include/linux/virtio_net.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h index cb462f9ab7dd..71f2394abbf7 100644 --- a/include/linux/virtio_net.h +++ b/include/linux/virtio_net.h | |||
@@ -57,6 +57,15 @@ static inline int virtio_net_hdr_to_skb(struct sk_buff *skb, | |||
57 | 57 | ||
58 | if (!skb_partial_csum_set(skb, start, off)) | 58 | if (!skb_partial_csum_set(skb, start, off)) |
59 | return -EINVAL; | 59 | return -EINVAL; |
60 | } else { | ||
61 | /* gso packets without NEEDS_CSUM do not set transport_offset. | ||
62 | * probe and drop if does not match one of the above types. | ||
63 | */ | ||
64 | if (gso_type) { | ||
65 | skb_probe_transport_header(skb, -1); | ||
66 | if (!skb_transport_header_was_set(skb)) | ||
67 | return -EINVAL; | ||
68 | } | ||
60 | } | 69 | } |
61 | 70 | ||
62 | if (hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) { | 71 | if (hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) { |