diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2009-11-30 15:53:30 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-30 15:53:30 -0500 |
commit | 1fdf475aa141a669af8db6ccc7015f0b725087de (patch) | |
tree | 7298a884935feb59352566ca6119856a0e322cb5 /net/ipv4/tcp.c | |
parent | 0cae200eec6330cd2c20b24279597be1da50dc93 (diff) |
tcp: tcp_disconnect() should clear window_clamp
NFS can reuse its TCP socket after calling tcp_disconnect().
We noticed window scaling was not negotiated in SYN packet of next
connection request.
Fix is to clear tp->window_clamp in tcp_disconnect().
Reported-by: Krzysztof Oledzki <ole@ans.pl>
Tested-by: Krzysztof Oledzki <ole@ans.pl>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r-- | net/ipv4/tcp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index f1813bc71088..d7a884c534a6 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -2059,6 +2059,7 @@ int tcp_disconnect(struct sock *sk, int flags) | |||
2059 | tp->snd_ssthresh = TCP_INFINITE_SSTHRESH; | 2059 | tp->snd_ssthresh = TCP_INFINITE_SSTHRESH; |
2060 | tp->snd_cwnd_cnt = 0; | 2060 | tp->snd_cwnd_cnt = 0; |
2061 | tp->bytes_acked = 0; | 2061 | tp->bytes_acked = 0; |
2062 | tp->window_clamp = 0; | ||
2062 | tcp_set_ca_state(sk, TCP_CA_Open); | 2063 | tcp_set_ca_state(sk, TCP_CA_Open); |
2063 | tcp_clear_retrans(tp); | 2064 | tcp_clear_retrans(tp); |
2064 | inet_csk_delack_init(sk); | 2065 | inet_csk_delack_init(sk); |