Skip to content

Commit

Permalink
tcp: move app_limited init to tcp_disconnect()
Browse files Browse the repository at this point in the history
If we make sure all listeners have app_limited set to ~0U,
then a clone will also inherit proper initial value.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Jan 18, 2019
1 parent 5c70154 commit 6cda8b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 3 additions & 0 deletions net/ipv4/tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2609,6 +2609,9 @@ int tcp_disconnect(struct sock *sk, int flags)
tp->sacked_out = 0;
tp->tlp_high_seq = 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 */
tcp_free_fastopen_req(tp);
Expand Down
3 changes: 0 additions & 3 deletions net/ipv4/tcp_minisocks.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,9 +486,6 @@ struct sock *tcp_create_openreq_child(const struct sock *sk,
newsk->sk_txhash = treq->txhash;
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);
newtp->write_seq = newtp->pushed_seq = treq->snt_isn + 1;

Expand Down

0 comments on commit 6cda8b7

Please sign in to comment.