diff options
-rw-r--r-- | net/ipv4/tcp_input.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 575d3c1fb6e8..cd8ea972dc65 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -1909,7 +1909,6 @@ void tcp_enter_loss(struct sock *sk) | |||
1909 | struct tcp_sock *tp = tcp_sk(sk); | 1909 | struct tcp_sock *tp = tcp_sk(sk); |
1910 | struct net *net = sock_net(sk); | 1910 | struct net *net = sock_net(sk); |
1911 | struct sk_buff *skb; | 1911 | struct sk_buff *skb; |
1912 | bool new_recovery = icsk->icsk_ca_state < TCP_CA_Recovery; | ||
1913 | bool is_reneg; /* is receiver reneging on SACKs? */ | 1912 | bool is_reneg; /* is receiver reneging on SACKs? */ |
1914 | bool mark_lost; | 1913 | bool mark_lost; |
1915 | 1914 | ||
@@ -1968,17 +1967,15 @@ void tcp_enter_loss(struct sock *sk) | |||
1968 | tp->high_seq = tp->snd_nxt; | 1967 | tp->high_seq = tp->snd_nxt; |
1969 | tcp_ecn_queue_cwr(tp); | 1968 | tcp_ecn_queue_cwr(tp); |
1970 | 1969 | ||
1971 | /* F-RTO RFC5682 sec 3.1 step 1: retransmit SND.UNA if no previous | 1970 | /* F-RTO RFC5682 sec 3.1 step 1 mandates to disable F-RTO |
1972 | * loss recovery is underway except recurring timeout(s) on | 1971 | * if a previous recovery is underway, otherwise it may incorrectly |
1973 | * the same SND.UNA (sec 3.2). Disable F-RTO on path MTU probing | 1972 | * call a timeout spurious if some previously retransmitted packets |
1974 | * | 1973 | * are s/acked (sec 3.2). We do not apply that retriction since |
1975 | * In theory F-RTO can be used repeatedly during loss recovery. | 1974 | * retransmitted skbs are permanently tagged with TCPCB_EVER_RETRANS |
1976 | * In practice this interacts badly with broken middle-boxes that | 1975 | * so FLAG_ORIG_SACK_ACKED is always correct. But we do disable F-RTO |
1977 | * falsely raise the receive window, which results in repeated | 1976 | * on PTMU discovery to avoid sending new data. |
1978 | * timeouts and stop-and-go behavior. | ||
1979 | */ | 1977 | */ |
1980 | tp->frto = net->ipv4.sysctl_tcp_frto && | 1978 | tp->frto = net->ipv4.sysctl_tcp_frto && |
1981 | (new_recovery || icsk->icsk_retransmits) && | ||
1982 | !inet_csk(sk)->icsk_mtup.probe_size; | 1979 | !inet_csk(sk)->icsk_mtup.probe_size; |
1983 | } | 1980 | } |
1984 | 1981 | ||