This patch fixes an issue in skb_gso_network_seglen where the calculated segment length includes the HBH headers of BIG TCP jumbograms despite these headers being removed before segmentation. These headers are added by GRO or by ip6_xmit for BIG TCP packets and are later removed by GSO. This bug causes MTU validation of BIG TCP jumbograms to fail. Signed-off-by: Mariusz Klimek --- net/core/gso.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/core/gso.c b/net/core/gso.c index bcd156372f4d..251a49181031 100644 --- a/net/core/gso.c +++ b/net/core/gso.c @@ -180,6 +180,10 @@ static unsigned int skb_gso_network_seglen(const struct sk_buff *skb) unsigned int hdr_len = skb_transport_header(skb) - skb_network_header(skb); + /* Jumbogram HBH header is removed upon segmentation. */ + if (skb->protocol == htons(ETH_P_IPV6) && skb->len > IPV6_MAXPLEN) + hdr_len -= sizeof(struct hop_jumbo_hdr); + return hdr_len + skb_gso_transport_seglen(skb); } -- 2.47.3