summaryrefslogtreecommitdiff
path: root/sys/net/pfkeyv2.c
diff options
context:
space:
mode:
authorVitaliy Makkoveev <mvs@cvs.openbsd.org>2022-08-22 21:18:49 +0000
committerVitaliy Makkoveev <mvs@cvs.openbsd.org>2022-08-22 21:18:49 +0000
commit8e852484aff4ad877e571db3827ed28736400f94 (patch)
treef5075eab5a27a8d5567a8ec8600754a7fbae39b5 /sys/net/pfkeyv2.c
parentef80f24a1a93275231aab19c91bffd558c518d42 (diff)
Move PRU_SHUTDOWN request to (*pru_shutdown)().
ok bluhm@
Diffstat (limited to 'sys/net/pfkeyv2.c')
-rw-r--r--sys/net/pfkeyv2.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/sys/net/pfkeyv2.c b/sys/net/pfkeyv2.c
index 193c6be10bc..8fbac63bf33 100644
--- a/sys/net/pfkeyv2.c
+++ b/sys/net/pfkeyv2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfkeyv2.c,v 1.240 2022/08/22 13:23:06 mvs Exp $ */
+/* $OpenBSD: pfkeyv2.c,v 1.241 2022/08/22 21:18:48 mvs Exp $ */
/*
* @(#)COPYRIGHT 1.1 (NRL) 17 January 1995
@@ -172,6 +172,7 @@ void pfkey_init(void);
int pfkeyv2_attach(struct socket *, int);
int pfkeyv2_detach(struct socket *);
int pfkeyv2_disconnect(struct socket *);
+int pfkeyv2_shutdown(struct socket *);
int pfkeyv2_usrreq(struct socket *, int, struct mbuf *, struct mbuf *,
struct mbuf *, struct proc *);
int pfkeyv2_output(struct mbuf *, struct socket *, struct sockaddr *,
@@ -205,6 +206,7 @@ const struct pr_usrreqs pfkeyv2_usrreqs = {
.pru_attach = pfkeyv2_attach,
.pru_detach = pfkeyv2_detach,
.pru_disconnect = pfkeyv2_disconnect,
+ .pru_shutdown = pfkeyv2_shutdown,
};
const struct protosw pfkeysw[] = {
@@ -342,6 +344,13 @@ pfkeyv2_disconnect(struct socket *so)
}
int
+pfkeyv2_shutdown(struct socket *so)
+{
+ socantsendmore(so);
+ return (0);
+}
+
+int
pfkeyv2_usrreq(struct socket *so, int req, struct mbuf *m,
struct mbuf *nam, struct mbuf *control, struct proc *p)
{
@@ -373,9 +382,6 @@ pfkeyv2_usrreq(struct socket *so, int req, struct mbuf *m,
case PRU_ABORT:
soisdisconnected(so);
break;
- case PRU_SHUTDOWN:
- socantsendmore(so);
- break;
case PRU_SENSE:
/* stat: don't bother with a blocksize. */
break;