This patch fixes urgent-pointer handling for TCP jumbograms. According to RFC2674, if the urgent pointer offset from the seq number is greater than 65535 but less than the length of the TCP data, the packet should be split into at least two pieces, with a new packet starting at the urgent offset. Though the optimal solution is to split the packet into exactly two packets, not sending jumbograms in the first place is a much simpler implementation which only requires capping the size returned from tcp_xmit_size_goal when large_allowed is false. Considering that urgent pointer is rarely used with jumbograms, this solution should suffice. Signed-off-by: Mariusz Klimek --- net/ipv4/tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 5ac2befbdc58..8a2e256913c8 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -963,7 +963,7 @@ static unsigned int tcp_xmit_size_goal(struct sock *sk, u32 mss_now, u16 gso_size; if (!large_allowed) - return mss_now; + return min(IPV6_MAXPLEN, mss_now); /* Note : tcp_tso_autosize() will eventually split this later */ new_size_goal = tcp_bound_to_half_wnd(tp, sk->sk_gso_max_size); -- 2.47.3