net: limit GSO_MAX_SIZE to 524280 bytes
authorEric Dumazet <edumazet@google.com>
Fri, 13 May 2022 18:33:58 +0000 (11:33 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 May 2022 09:18:55 +0000 (10:18 +0100)
commit34b92e8d19da1e44070dc0ecc2747871469ac534
treee2d4b9e60646f8b896c6cad40324196c0cc17f94
parent7c4e983c4f3cf94fcd879730c6caa877e0768a4d
net: limit GSO_MAX_SIZE to 524280 bytes

Make sure we will not overflow shinfo->gso_segs

Minimal TCP MSS size is 8 bytes, and shinfo->gso_segs
is a 16bit field.

TCP_MIN_GSO_SIZE is currently defined in include/net/tcp.h,
it seems cleaner to not bring tcp details into include/linux/netdevice.h

Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Alexander Duyck <alexanderduyck@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h