diff options
author | David Ahern <dsa@cumulusnetworks.com> | 2016-08-23 21:06:33 -0700 |
---|---|---|
committer | Amit Pundir <amit.pundir@linaro.org> | 2016-10-12 17:34:22 +0530 |
commit | 4727ce1c829c2be8ea2e5fedb31ee7d99d26d95d (patch) | |
tree | 00e90344b63d96b97f0a0786f5bd76a72dd9b134 /net/ipv6 | |
parent | 65aad0e5bee187ebd08526ae5faa120b002cf1bb (diff) |
net: diag: support SOCK_DESTROY for UDP sockets
This implements SOCK_DESTROY for UDP sockets similar to what was done
for TCP with commit c1e64e298b8ca ("net: diag: Support destroying TCP
sockets.") A process with a UDP socket targeted for destroy is awakened
and recvmsg fails with ECONNABORTED.
[cherry-pick of 5d77dca82839ef016a93ad7acd7058b14d967752]
Change-Id: I4b4862548e6e3c05dde27781e7daa0b18b93bd81
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/udp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index 1a5b9322e713..2415e55aaf8f 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c @@ -1552,6 +1552,7 @@ struct proto udpv6_prot = { .compat_getsockopt = compat_udpv6_getsockopt, #endif .clear_sk = udp_v6_clear_sk, + .diag_destroy = udp_abort, }; static struct inet_protosw udpv6_protosw = { |