Skip to content

Commit abe74fb

Browse files
xli98gregkh
authored andcommitted
udp: using datalen to cap ipv6 udp max gso segments
[ Upstream commit 736ef37 ] The max number of UDP gso segments is intended to cap to UDP_MAX_SEGMENTS, this is checked in udp_send_skb(). skb->len contains network and transport header len here, we should use only data len instead. This is the ipv6 counterpart to the below referenced commit, which missed the ipv6 change Fixes: 158390e ("udp: using datalen to cap max gso segments") Signed-off-by: Coco Li <lixiaoyan@google.com> Reviewed-by: Willem de Bruijn <willemb@google.com> Link: https://lore.kernel.org/r/20211223222441.2975883-1-lixiaoyan@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 5e6ad64 commit abe74fb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎net/ipv6/udp.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1189,7 +1189,7 @@ static int udp_v6_send_skb(struct sk_buff *skb, struct flowi6 *fl6,
11891189
kfree_skb(skb);
11901190
return -EINVAL;
11911191
}
1192-
if (skb->len > cork->gso_size * UDP_MAX_SEGMENTS) {
1192+
if (datalen > cork->gso_size * UDP_MAX_SEGMENTS) {
11931193
kfree_skb(skb);
11941194
return -EINVAL;
11951195
}

0 commit comments

Comments
 (0)