Message ID | 20210901122250.086546902@linuxfoundation.org |
---|---|
State | Superseded |
Headers | show |
Series | None | expand |
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index 9940a59306b5..1a4d89f8361c 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c @@ -443,6 +443,8 @@ static void __gre_xmit(struct sk_buff *skb, struct net_device *dev, static int gre_handle_offloads(struct sk_buff *skb, bool csum) { + if (csum && skb_checksum_start(skb) < skb->data) + return -EINVAL; return iptunnel_handle_offloads(skb, csum ? SKB_GSO_GRE_CSUM : SKB_GSO_GRE); }