diff options
author | mpi <mpi@openbsd.org> | 2018-05-08 14:10:43 +0000 |
---|---|---|
committer | mpi <mpi@openbsd.org> | 2018-05-08 14:10:43 +0000 |
commit | e75f3a2adabb6005f605acb0422d4ee005d0bb09 (patch) | |
tree | bc978d9ee3660133f51948126646a5bab54445b4 /sys/net/pfkeyv2.c | |
parent | Print xHCI revision in dmesg. (diff) | |
download | wireguard-openbsd-e75f3a2adabb6005f605acb0422d4ee005d0bb09.tar.xz wireguard-openbsd-e75f3a2adabb6005f605acb0422d4ee005d0bb09.zip |
Introduce rtm_sendup() a function to deliver routing messages to a
socket receive buffer.
It is modelled after pfkey_sendup() as both will need the same MP
treatment.
ok tb@, bluhm@, visa@
Diffstat (limited to 'sys/net/pfkeyv2.c')
-rw-r--r-- | sys/net/pfkeyv2.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/net/pfkeyv2.c b/sys/net/pfkeyv2.c index 66db6f67f66..50bc080f374 100644 --- a/sys/net/pfkeyv2.c +++ b/sys/net/pfkeyv2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfkeyv2.c,v 1.176 2018/02/19 08:59:52 mpi Exp $ */ +/* $OpenBSD: pfkeyv2.c,v 1.177 2018/05/08 14:10:43 mpi Exp $ */ /* * @(#)COPYRIGHT 1.1 (NRL) 17 January 1995 @@ -332,21 +332,21 @@ ret: } int -pfkey_sendup(struct keycb *kp, struct mbuf *packet, int more) +pfkey_sendup(struct keycb *kp, struct mbuf *m0, int more) { struct socket *so = kp->rcb.rcb_socket; - struct mbuf *packet2; + struct mbuf *m; NET_ASSERT_LOCKED(); if (more) { - if (!(packet2 = m_dup_pkt(packet, 0, M_DONTWAIT))) + if (!(m = m_dup_pkt(m0, 0, M_DONTWAIT))) return (ENOMEM); } else - packet2 = packet; + m = m0; - if (!sbappendaddr(so, &so->so_rcv, &pfkey_addr, packet2, NULL)) { - m_freem(packet2); + if (!sbappendaddr(so, &so->so_rcv, &pfkey_addr, m, NULL)) { + m_freem(m); return (ENOBUFS); } |