summaryrefslogtreecommitdiff
path: root/net/ipv4
diff options
context:
space:
mode:
authorJohn Heffner <jheffner@psc.edu>2007-02-06 21:57:34 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2007-03-09 10:50:19 -0800
commitc1689102c93ed8754c2c1c09139e90c10f59683a (patch)
treeead9ebf41a89984bfa237e9b74288222dedeae01 /net/ipv4
parent977e7e120593695d1a5ac66df5dbd44113ce49a8 (diff)
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 <jheffner@psc.edu> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/tcp_output.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 975f4472af29..58b7111523f4 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);