From: John Heffner Date: Wed, 7 Feb 2007 05:57:34 +0000 (-0800) Subject: Fix TCP FIN handling X-Git-Tag: v2.6.20.2~86 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1689102c93ed8754c2c1c09139e90c10f59683a;p=thirdparty%2Fkernel%2Fstable.git Fix TCP FIN handling We can accidently spit out a huge burst of packets with TSO when the FIN back is piggybacked onto the final packet. [TCP]: Don't apply FIN exception to full TSO segments. Signed-off-by: John Heffner Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 975f4472af29c..58b7111523f4a 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -965,7 +965,8 @@ static inline unsigned int tcp_cwnd_test(struct tcp_sock *tp, struct sk_buff *sk u32 in_flight, cwnd; /* Don't be strict about the congestion window for the final FIN. */ - if (TCP_SKB_CB(skb)->flags & TCPCB_FLAG_FIN) + if ((TCP_SKB_CB(skb)->flags & TCPCB_FLAG_FIN) && + tcp_skb_pcount(skb) == 1) return 1; in_flight = tcp_packets_in_flight(tp);