]> git.baikalelectronics.ru Git - kernel.git/commit
net: diag: Support destroying TCP sockets.
authorLorenzo Colitti <lorenzo@google.com>
Wed, 16 Dec 2015 03:30:05 +0000 (12:30 +0900)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 Dec 2015 04:26:52 +0000 (23:26 -0500)
commit5264d240d5ad5c26f53d0e63f0c42c8c19232ec8
treec9ddd8cb837aabafdea04d5c04b74902e5da1a21
parentb8fa8d2c3c7f917d2731815ca5e6e7206ce4b60c
net: diag: Support destroying TCP sockets.

This implements SOCK_DESTROY for TCP sockets. It causes all
blocking calls on the socket to fail fast with ECONNABORTED and
causes a protocol close of the socket. It informs the other end
of the connection by sending a RST, i.e., initiating a TCP ABORT
as per RFC 793. ECONNABORTED was chosen for consistency with
FreeBSD.

Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/tcp.h
net/ipv4/Kconfig
net/ipv4/tcp.c
net/ipv4/tcp_diag.c
net/ipv4/tcp_ipv4.c
net/ipv6/tcp_ipv6.c