diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index 8a1863146f34c..069551a04369e 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c @@ -1189,7 +1189,7 @@ static int udp_v6_send_skb(struct sk_buff *skb, struct flowi6 *fl6, kfree_skb(skb); return -EINVAL; } - if (skb->len > cork->gso_size * UDP_MAX_SEGMENTS) { + if (datalen > cork->gso_size * UDP_MAX_SEGMENTS) { kfree_skb(skb); return -EINVAL; }