diff options
author | Vitaliy Makkoveev <mvs@cvs.openbsd.org> | 2022-10-17 14:49:03 +0000 |
---|---|---|
committer | Vitaliy Makkoveev <mvs@cvs.openbsd.org> | 2022-10-17 14:49:03 +0000 |
commit | 6df1ab8d120cb4c59dd442a169998af32cc6acf4 (patch) | |
tree | f80cacefb3bb6231f1bef791ea0de583087614f5 /sys/netinet/udp_usrreq.c | |
parent | ec7a17806a64a7084a79bc6b28e404fa3022af01 (diff) |
Change pru_abort() return type to the type of void and make pru_abort()
optional.
We have no interest on pru_abort() return value. We call it only from
soabort() which is dummy pru_abort() wrapper and has no return value.
Only the connection oriented sockets need to implement (*pru_abort)()
handler. Such sockets are tcp(4) and unix(4) sockets, so remove existing
code for all others, it doesn't called.
ok guenther@
Diffstat (limited to 'sys/netinet/udp_usrreq.c')
-rw-r--r-- | sys/netinet/udp_usrreq.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index 1b7aa8210b9..f28df13e0ef 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: udp_usrreq.c,v 1.303 2022/10/03 16:43:52 bluhm Exp $ */ +/* $OpenBSD: udp_usrreq.c,v 1.304 2022/10/17 14:49:02 mvs Exp $ */ /* $NetBSD: udp_usrreq.c,v 1.28 1996/03/16 23:54:03 christos Exp $ */ /* @@ -132,7 +132,6 @@ const struct pr_usrreqs udp_usrreqs = { .pru_disconnect = udp_disconnect, .pru_shutdown = udp_shutdown, .pru_send = udp_send, - .pru_abort = udp_abort, .pru_control = in_control, .pru_sockaddr = in_sockaddr, .pru_peeraddr = in_peeraddr, @@ -149,7 +148,6 @@ const struct pr_usrreqs udp6_usrreqs = { .pru_disconnect = udp_disconnect, .pru_shutdown = udp_shutdown, .pru_send = udp_send, - .pru_abort = udp_abort, .pru_control = in6_control, .pru_sockaddr = in6_sockaddr, .pru_peeraddr = in6_peeraddr, @@ -1260,19 +1258,6 @@ udp_send(struct socket *so, struct mbuf *m, struct mbuf *addr, return (error); } -int -udp_abort(struct socket *so) -{ - struct inpcb *inp = sotoinpcb(so); - - soassertlocked(so); - - soisdisconnected(so); - in_pcbdetach(inp); - - return (0); -} - /* * Sysctl for udp variables. */ |