summaryrefslogtreecommitdiff
path: root/net/ipv4/tcp.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-05-23 06:32:48 +0300
committerDavid S. Miller <davem@davemloft.net>2017-05-23 06:32:48 +0300
commit218b6a5b23e939caf2064549b1cb61ba22b9d0a1 (patch)
treebdabf5439fb58905268953165779614d2aadb677 /net/ipv4/tcp.c
parent1db3a61017c627d590315347ccf302d9a6b97970 (diff)
parentfadd2ce5a3680fb265694f573cbfb8bcb7d6c9d5 (diff)
downloadlinux-218b6a5b23e939caf2064549b1cb61ba22b9d0a1.tar.xz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r--net/ipv4/tcp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 9a56077eafea..aaf663a1e571 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -2320,6 +2320,10 @@ int tcp_disconnect(struct sock *sk, int flags)
tcp_set_ca_state(sk, TCP_CA_Open);
tcp_clear_retrans(tp);
inet_csk_delack_init(sk);
+ /* Initialize rcv_mss to TCP_MIN_MSS to avoid division by 0
+ * issue in __tcp_select_window()
+ */
+ icsk->icsk_ack.rcv_mss = TCP_MIN_MSS;
tcp_init_send_head(sk);
memset(&tp->rx_opt, 0, sizeof(tp->rx_opt));
__sk_dst_reset(sk);