mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
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>
This commit is contained in:
parent
6eb5d2e08f
commit
c1e64e298b
6 changed files with 68 additions and 0 deletions
|
@ -2342,6 +2342,7 @@ struct proto tcp_prot = {
|
|||
.destroy_cgroup = tcp_destroy_cgroup,
|
||||
.proto_cgroup = tcp_proto_cgroup,
|
||||
#endif
|
||||
.diag_destroy = tcp_abort,
|
||||
};
|
||||
EXPORT_SYMBOL(tcp_prot);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue