aboutsummaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorDavid Ahern <dsa@cumulusnetworks.com>2016-08-23 21:06:33 -0700
committerMister Oyster <oysterized@gmail.com>2017-04-11 10:57:03 +0200
commit4b430a48b6b9a0e8000188f28fee2f745241b0d1 (patch)
tree5b70099e1be785d0f98240d3940ec94007ecfc7a /include/net
parenta93437f0b1caa92137a48599d29c37c73c8bd283 (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. [backport of net-next 5d77dca82839ef016a93ad7acd7058b14d967752] Change-Id: I84e71e774c859002f98dcdb5e0ca01f35227a44c Signed-off-by: David Ahern <dsa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/udp.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/udp.h b/include/net/udp.h
index f7216be30..a3a24a1f1 100644
--- a/include/net/udp.h
+++ b/include/net/udp.h
@@ -188,6 +188,7 @@ extern int udp_get_port(struct sock *sk, unsigned short snum,
int (*saddr_cmp)(const struct sock *,
const struct sock *));
extern void udp_err(struct sk_buff *, u32);
+int udp_abort(struct sock *sk, int err);
extern int udp_sendmsg(struct kiocb *iocb, struct sock *sk,
struct msghdr *msg, size_t len);
extern int udp_push_pending_frames(struct sock *sk);