]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/2.6.32.12/tcp-fix-icmp-rto-war.patch
Remove duplicated commits
[thirdparty/kernel/stable-queue.git] / releases / 2.6.32.12 / tcp-fix-icmp-rto-war.patch
CommitLineData
a82817d0
GKH
1From 598856407d4e20ebb4de01a91a93d89325924d43 Mon Sep 17 00:00:00 2001
2From: Damian Lukowski <damian@tvk.rwth-aachen.de>
3Date: Wed, 10 Feb 2010 18:04:08 -0800
4Subject: tcp: fix ICMP-RTO war
5
6From: Damian Lukowski <damian@tvk.rwth-aachen.de>
7
8commit 598856407d4e20ebb4de01a91a93d89325924d43 upstream.
9
10Make sure, that TCP has a nonzero RTT estimation after three-way
11handshake. Currently, a listening TCP has a value of 0 for srtt,
12rttvar and rto right after the three-way handshake is completed
13with TCP timestamps disabled.
14This will lead to corrupt RTO recalculation and retransmission
15flood when RTO is recalculated on backoff reversion as introduced
16in "Revert RTO on ICMP destination unreachable"
17(f1ecd5d9e7366609d640ff4040304ea197fbc618).
18This behaviour can be provoked by connecting to a server which
19"responds first" (like SMTP) and rejecting every packet after
20the handshake with dest-unreachable, which will lead to softirq
21load on the server (up to 30% per socket in some tests).
22
23Thanks to Ilpo Jarvinen for providing debug patches and to
24Denys Fedoryshchenko for reporting and testing.
25
26Changes since v3: Removed bad characters in patchfile.
27
28Reported-by: Denys Fedoryshchenko <denys@visp.net.lb>
29Signed-off-by: Damian Lukowski <damian@tvk.rwth-aachen.de>
30Signed-off-by: David S. Miller <davem@davemloft.net>
31Cc: maximilian attems <max@stro.at>
32Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
33
34---
35 net/ipv4/tcp_input.c | 6 ++----
36 1 file changed, 2 insertions(+), 4 deletions(-)
37
38--- a/net/ipv4/tcp_input.c
39+++ b/net/ipv4/tcp_input.c
40@@ -5699,11 +5699,9 @@ int tcp_rcv_state_process(struct sock *s
41
42 /* tcp_ack considers this ACK as duplicate
43 * and does not calculate rtt.
44- * Fix it at least with timestamps.
45+ * Force it here.
46 */
47- if (tp->rx_opt.saw_tstamp &&
48- tp->rx_opt.rcv_tsecr && !tp->srtt)
49- tcp_ack_saw_tstamp(sk, 0);
50+ tcp_ack_update_rtt(sk, 0, 0);
51
52 if (tp->rx_opt.tstamp_ok)
53 tp->advmss -= TCPOLEN_TSTAMP_ALIGNED;