]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: Reset bytes_acked and bytes_received when disconnecting
authorChristoph Paasch <cpaasch@apple.com>
Sat, 6 Jul 2019 23:13:07 +0000 (16:13 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 9 Jul 2019 02:29:19 +0000 (19:29 -0700)
commitca7ea447334881cb32e0652639143c9327a1c8f7
treefd947f61dfb523a13ff1513676705215bb1289f3
parentb93d18293e8b7d9c7af6e86d7450cc40f257add6
tcp: Reset bytes_acked and bytes_received when disconnecting

If an app is playing tricks to reuse a socket via tcp_disconnect(),
bytes_acked/received needs to be reset to 0. Otherwise tcp_info will
report the sum of the current and the old connection..

Cc: Eric Dumazet <edumazet@google.com>
Fixes: 19e60581cba4 ("tcp: add tcpi_bytes_acked to tcp_info")
Fixes: fc9cbdec8780 ("tcp: add tcpi_bytes_received to tcp_info")
Signed-off-by: Christoph Paasch <cpaasch@apple.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp.c