]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: diag: add support for TIME_WAIT sockets to tcp_abort()
authorEric Dumazet <edumazet@google.com>
Mon, 27 Jun 2022 12:10:38 +0000 (12:10 +0000)
committerJakub Kicinski <kuba@kernel.org>
Wed, 29 Jun 2022 04:26:56 +0000 (21:26 -0700)
commita33ab5e90781d2d5833ca9bbcad79f8433cf1eec
treed009369882a53d0882a5b08bba87a6b8081fadb8
parent466dd4d5e42d8b362fec52a8e8da26e92df1a521
tcp: diag: add support for TIME_WAIT sockets to tcp_abort()

Currently, "ss -K -ta ..." does not support TIME_WAIT sockets.

Issue has been raised at least two times in the past [1] [2]
it is time to fix it.

[1] https://lore.kernel.org/netdev/ba65f579-4e69-ae0d-4770-bc6234beb428@gmail.com/
[2] https://lore.kernel.org/netdev/CANn89i+R9RgmD=AQ4vX1Vb_SQAj4c3fi7-ZtQz-inYY4Sq4CMQ@mail.gmail.com/T/

While we are at it, use inet_sk_state_load() while tcp_abort()
does not hold a lock on the socket.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Tested-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Link: https://lore.kernel.org/r/20220627121038.226500-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/tcp.c