summaryrefslogtreecommitdiff
path: root/net/ipv4/tcp_minisocks.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2019-01-17 11:23:42 -0800
committerDavid S. Miller <davem@davemloft.net>2019-01-17 22:19:05 -0800
commit6bcdc40dddfe79408e809ec1e2c13f08c863c0b2 (patch)
treee432d56cc0b4e01edc9e755e231143a6afea0613 /net/ipv4/tcp_minisocks.c
parent792c4354a508c42c69f4771287cb99dde4ab79be (diff)
downloadlwn-6bcdc40dddfe79408e809ec1e2c13f08c863c0b2.tar.gz
lwn-6bcdc40dddfe79408e809ec1e2c13f08c863c0b2.zip
tcp: move rx_opt & syn_data_acked init to tcp_disconnect()
If we make sure all listeners have these fields cleared, then a clone will also inherit zero values. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_minisocks.c')
-rw-r--r--net/ipv4/tcp_minisocks.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c
index 27e11eb4164c..182595e2d40f 100644
--- a/net/ipv4/tcp_minisocks.c
+++ b/net/ipv4/tcp_minisocks.c
@@ -489,11 +489,6 @@ struct sock *tcp_create_openreq_child(const struct sock *sk,
tcp_init_xmit_timers(newsk);
newtp->write_seq = newtp->pushed_seq = treq->snt_isn + 1;
- newtp->rx_opt.saw_tstamp = 0;
-
- newtp->rx_opt.dsack = 0;
- newtp->rx_opt.num_sacks = 0;
-
if (sock_flag(newsk, SOCK_KEEPOPEN))
inet_csk_reset_keepalive_timer(newsk,
keepalive_time_when(newtp));
@@ -534,7 +529,6 @@ struct sock *tcp_create_openreq_child(const struct sock *sk,
tcp_ecn_openreq_child(newtp, req);
newtp->fastopen_req = NULL;
newtp->fastopen_rsk = NULL;
- newtp->syn_data_acked = 0;
__TCP_INC_STATS(sock_net(sk), TCP_MIB_PASSIVEOPENS);