diff options
Diffstat (limited to 'sys/netinet6/ip6_divert.c')
-rw-r--r-- | sys/netinet6/ip6_divert.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/sys/netinet6/ip6_divert.c b/sys/netinet6/ip6_divert.c index 1f20dc64d83..e41e734733c 100644 --- a/sys/netinet6/ip6_divert.c +++ b/sys/netinet6/ip6_divert.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6_divert.c,v 1.54 2017/10/09 08:35:38 mpi Exp $ */ +/* $OpenBSD: ip6_divert.c,v 1.55 2017/11/02 14:01:18 florian Exp $ */ /* * Copyright (c) 2009 Michele Marchetto <michele@openbsd.org> @@ -257,10 +257,6 @@ divert6_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *addr, } switch (req) { - case PRU_DETACH: - in_pcbdetach(inp); - break; - case PRU_BIND: error = in_pcbbind(inp, addr, p); break; @@ -338,6 +334,21 @@ divert6_attach(struct socket *so, int proto) } int +divert6_detach(struct socket *so) +{ + struct inpcb *inp = sotoinpcb(so); + + soassertlocked(so); + + if (inp == NULL) + return (EINVAL); + + in_pcbdetach(inp); + + return (0); +} + +int divert6_sysctl_div6stat(void *oldp, size_t *oldlenp, void *newp) { uint64_t counters[div6s_ncounters]; |