diff options
author | Lorenzo Colitti <lorenzo@google.com> | 2015-12-15 22:30:05 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-12-15 23:26:52 -0500 |
commit | c1e64e298b8cad309091b95d8436a0255c84f54a (patch) | |
tree | c9ddd8cb837aabafdea04d5c04b74902e5da1a21 /net/ipv4/tcp_ipv4.c | |
parent | 6eb5d2e08f071c05ecbe135369c9ad418826cab2 (diff) |
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>
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index db003438aaf5..7aa13bd3de29 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -2342,6 +2342,7 @@ struct proto tcp_prot = { | |||
2342 | .destroy_cgroup = tcp_destroy_cgroup, | 2342 | .destroy_cgroup = tcp_destroy_cgroup, |
2343 | .proto_cgroup = tcp_proto_cgroup, | 2343 | .proto_cgroup = tcp_proto_cgroup, |
2344 | #endif | 2344 | #endif |
2345 | .diag_destroy = tcp_abort, | ||
2345 | }; | 2346 | }; |
2346 | EXPORT_SYMBOL(tcp_prot); | 2347 | EXPORT_SYMBOL(tcp_prot); |
2347 | 2348 | ||