From 792c4354a508c42c69f4771287cb99dde4ab79be Mon Sep 17 00:00:00 2001 From: Eric Dumazet Date: Thu, 17 Jan 2019 11:23:41 -0800 Subject: tcp: move tp->rack init to tcp_disconnect() If we make sure all listeners have proper tp->rack value, then a clone will also inherit proper initial value. Note that fresh sockets init tp->rack from tcp_init_sock() Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller --- net/ipv4/tcp.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'net/ipv4/tcp.c') diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 5f15fcc9612a..2348199e6cee 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -2611,6 +2611,12 @@ int tcp_disconnect(struct sock *sk, int flags) tp->last_oow_ack_time = 0; /* There's a bubble in the pipe until at least the first ACK. */ tp->app_limited = ~0U; + tp->rack.mstamp = 0; + tp->rack.advanced = 0; + tp->rack.reo_wnd_steps = 1; + tp->rack.last_delivered = 0; + tp->rack.reo_wnd_persist = 0; + tp->rack.dsack_seen = 0; /* Clean up fastopen related fields */ -- cgit 1.4.1