On Mon, 2016-08-22 at 18:03 -0700, David Ahern wrote:
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.
Signed-off-by: David Ahern <redacted>
---
v2
- changed socket lookup to __udp{4,6}_lib_lookup
include/net/udp.h | 1 +
net/ipv4/udp.c | 17 +++++++++++++++++
net/ipv4/udp_diag.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++
net/ipv6/udp.c | 1 +
4 files changed, 74 insertions(+)
Hi David
It seems you forgot the sock_diag_check_cookie() call, but other than
that this patch looks fine.
Thanks.