| From stable-bounces@linux.kernel.org Tue Feb 6 21:58:49 2007 |
| From: John Heffner <jheffner@psc.edu> |
| Date: Tue, 06 Feb 2007 21:57:34 -0800 (PST) |
| Subject: Fix TCP FIN handling |
| To: stable@kernel.org |
| Cc: bunk@stusta.de |
| Message-ID: <20070206.215734.83621142.davem@davemloft.net> |
| |
| From: John Heffner <jheffner@psc.edu> |
| |
| 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 <jheffner@psc.edu> |
| Signed-off-by: David S. Miller <davem@davemloft.net> |
| Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> |
| |
| --- |
| net/ipv4/tcp_output.c | 3 ++- |
| 1 file changed, 2 insertions(+), 1 deletion(-) |
| |
| --- linux-2.6.20.1.orig/net/ipv4/tcp_output.c |
| +++ linux-2.6.20.1/net/ipv4/tcp_output.c |
| @@ -965,7 +965,8 @@ static inline unsigned int tcp_cwnd_test |
| 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); |