diff options
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r-- | net/ipv4/tcp_output.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index c8fc512e0bbb..21713836d46a 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -2435,6 +2435,7 @@ bool tcp_schedule_loss_probe(struct sock *sk) | |||
2435 | struct inet_connection_sock *icsk = inet_csk(sk); | 2435 | struct inet_connection_sock *icsk = inet_csk(sk); |
2436 | struct tcp_sock *tp = tcp_sk(sk); | 2436 | struct tcp_sock *tp = tcp_sk(sk); |
2437 | u32 timeout, rto_delta_us; | 2437 | u32 timeout, rto_delta_us; |
2438 | int early_retrans; | ||
2438 | 2439 | ||
2439 | /* Don't do any loss probe on a Fast Open connection before 3WHS | 2440 | /* Don't do any loss probe on a Fast Open connection before 3WHS |
2440 | * finishes. | 2441 | * finishes. |
@@ -2442,10 +2443,11 @@ bool tcp_schedule_loss_probe(struct sock *sk) | |||
2442 | if (tp->fastopen_rsk) | 2443 | if (tp->fastopen_rsk) |
2443 | return false; | 2444 | return false; |
2444 | 2445 | ||
2446 | early_retrans = sock_net(sk)->ipv4.sysctl_tcp_early_retrans; | ||
2445 | /* Schedule a loss probe in 2*RTT for SACK capable connections | 2447 | /* Schedule a loss probe in 2*RTT for SACK capable connections |
2446 | * in Open state, that are either limited by cwnd or application. | 2448 | * in Open state, that are either limited by cwnd or application. |
2447 | */ | 2449 | */ |
2448 | if ((sysctl_tcp_early_retrans != 3 && sysctl_tcp_early_retrans != 4) || | 2450 | if ((early_retrans != 3 && early_retrans != 4) || |
2449 | !tp->packets_out || !tcp_is_sack(tp) || | 2451 | !tp->packets_out || !tcp_is_sack(tp) || |
2450 | icsk->icsk_ca_state != TCP_CA_Open) | 2452 | icsk->icsk_ca_state != TCP_CA_Open) |
2451 | return false; | 2453 | return false; |