aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/tcp_ipv6.c
diff options
context:
space:
mode:
authorLorenzo Colitti <[email protected]>2015-12-16 03:30:05 +0000
committerDavid S. Miller <[email protected]>2015-12-16 04:26:52 +0000
commitc1e64e298b8cad309091b95d8436a0255c84f54a (patch)
treec9ddd8cb837aabafdea04d5c04b74902e5da1a21 /net/ipv6/tcp_ipv6.c
parentnet: diag: Support SOCK_DESTROY for inet sockets. (diff)
downloadkernel-c1e64e298b8cad309091b95d8436a0255c84f54a.tar.gz
kernel-c1e64e298b8cad309091b95d8436a0255c84f54a.zip
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 <[email protected]> Acked-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
-rw-r--r--net/ipv6/tcp_ipv6.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index c16e3fbf6854..5382c2662fa2 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -1890,6 +1890,7 @@ struct proto tcpv6_prot = {
.proto_cgroup = tcp_proto_cgroup,
#endif
.clear_sk = tcp_v6_clear_sk,
+ .diag_destroy = tcp_abort,
};
static const struct inet6_protocol tcpv6_protocol = {