summaryrefslogtreecommitdiffstats
path: root/net/ipv6/tcpv6_offload.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/tcpv6_offload.c')
-rw-r--r--net/ipv6/tcpv6_offload.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv6/tcpv6_offload.c b/net/ipv6/tcpv6_offload.c
index d883c9204c01..278e49cd67d4 100644
--- a/net/ipv6/tcpv6_offload.c
+++ b/net/ipv6/tcpv6_offload.c
@@ -46,6 +46,9 @@ static struct sk_buff *tcp6_gso_segment(struct sk_buff *skb,
{
struct tcphdr *th;
+ if (!(skb_shinfo(skb)->gso_type & SKB_GSO_TCPV6))
+ return ERR_PTR(-EINVAL);
+
if (!pskb_may_pull(skb, sizeof(*th)))
return ERR_PTR(-EINVAL);