提交 eb2c80ca 编写于 作者: E Eric Dumazet 提交者: David S. Miller

tcp: do not clear packets_out in tcp_create_openreq_child()

New sockets have this field cleared, and tcp_disconnect()
calls tcp_write_queue_purge() which among other things
also clear tp->packets_out

So a listener is guaranteed to have this field cleared.
Signed-off-by: NEric Dumazet <edumazet@google.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 6a408147
...@@ -484,7 +484,6 @@ struct sock *tcp_create_openreq_child(const struct sock *sk, ...@@ -484,7 +484,6 @@ struct sock *tcp_create_openreq_child(const struct sock *sk,
minmax_reset(&newtp->rtt_min, tcp_jiffies32, ~0U); minmax_reset(&newtp->rtt_min, tcp_jiffies32, ~0U);
newicsk->icsk_ack.lrcvtime = tcp_jiffies32; newicsk->icsk_ack.lrcvtime = tcp_jiffies32;
newtp->packets_out = 0;
newtp->retrans_out = 0; newtp->retrans_out = 0;
newtp->sacked_out = 0; newtp->sacked_out = 0;
newtp->tlp_high_seq = 0; newtp->tlp_high_seq = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册