summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/ip6_mroute.c
diff options
context:
space:
mode:
authordhill <dhill@openbsd.org>2017-02-01 20:59:47 +0000
committerdhill <dhill@openbsd.org>2017-02-01 20:59:47 +0000
commit490e07389287ee0220d61374d4494b51bf6c4492 (patch)
tree9fac3a8a03787a9dd2622cff8c29c632a3dfefa7 /sys/netinet6/ip6_mroute.c
parentAdd a missing sizeof(*lines) factor to previous commit to ensure we zero (diff)
downloadwireguard-openbsd-490e07389287ee0220d61374d4494b51bf6c4492.tar.xz
wireguard-openbsd-490e07389287ee0220d61374d4494b51bf6c4492.zip
In sogetopt, preallocate an mbuf to avoid using sleeping mallocs with
the netlock held. This also changes the prototypes of the *ctloutput functions to take an mbuf instead of an mbuf pointer. help, guidance from bluhm@ and mpi@ ok bluhm@
Diffstat (limited to 'sys/netinet6/ip6_mroute.c')
-rw-r--r--sys/netinet6/ip6_mroute.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/netinet6/ip6_mroute.c b/sys/netinet6/ip6_mroute.c
index c91accd4d64..0abe20f8094 100644
--- a/sys/netinet6/ip6_mroute.c
+++ b/sys/netinet6/ip6_mroute.c
@@ -245,13 +245,11 @@ ip6_mrouter_set(int cmd, struct socket *so, struct mbuf *m)
* Handle MRT getsockopt commands
*/
int
-ip6_mrouter_get(int cmd, struct socket *so, struct mbuf **mp)
+ip6_mrouter_get(int cmd, struct socket *so, struct mbuf *m)
{
if (so != ip6_mrouter)
return (EPERM);
- *mp = m_get(M_WAIT, MT_SOOPTS);
-
switch (cmd) {
default:
return EOPNOTSUPP;