Commit 6cda8b74 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

tcp: move app_limited init to tcp_disconnect()

If we make sure all listeners have app_limited set to ~0U,
then a clone will also inherit proper initial value.
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5c701549
...@@ -2609,6 +2609,9 @@ int tcp_disconnect(struct sock *sk, int flags) ...@@ -2609,6 +2609,9 @@ int tcp_disconnect(struct sock *sk, int flags)
tp->sacked_out = 0; tp->sacked_out = 0;
tp->tlp_high_seq = 0; tp->tlp_high_seq = 0;
tp->last_oow_ack_time = 0; tp->last_oow_ack_time = 0;
/* There's a bubble in the pipe until at least the first ACK. */
tp->app_limited = ~0U;
/* Clean up fastopen related fields */ /* Clean up fastopen related fields */
tcp_free_fastopen_req(tp); tcp_free_fastopen_req(tp);
......
...@@ -486,9 +486,6 @@ struct sock *tcp_create_openreq_child(const struct sock *sk, ...@@ -486,9 +486,6 @@ struct sock *tcp_create_openreq_child(const struct sock *sk,
newsk->sk_txhash = treq->txhash; newsk->sk_txhash = treq->txhash;
newtp->total_retrans = req->num_retrans; newtp->total_retrans = req->num_retrans;
/* There's a bubble in the pipe until at least the first ACK. */
newtp->app_limited = ~0U;
tcp_init_xmit_timers(newsk); tcp_init_xmit_timers(newsk);
newtp->write_seq = newtp->pushed_seq = treq->snt_isn + 1; newtp->write_seq = newtp->pushed_seq = treq->snt_isn + 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment