diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index e62de979ee30..fce32f3e42b5 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -798,7 +798,7 @@ static int udp_send_skb(struct sk_buff *skb, struct flowi4 *fl4, 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; }