diff options
author | 2002-12-11 21:48:40 +0000 | |
---|---|---|
committer | 2002-12-11 21:48:40 +0000 | |
commit | 9a62e4cf6ec17f2c2853951323b87c87dc15b5eb (patch) | |
tree | 0756925657b468f94dfbf50bedec9594791d57b8 | |
parent | ansi; p/o by Andrushock <andrushock@korovino.net> (diff) | |
download | wireguard-openbsd-9a62e4cf6ec17f2c2853951323b87c87dc15b5eb.tar.xz wireguard-openbsd-9a62e4cf6ec17f2c2853951323b87c87dc15b5eb.zip |
Use m_copym2 to copy the whole mbuf (cluster included) and not
incrementing its reference. Fixes a m_zero panic reported by markus@ when
pfdatatopacket returns a cluster.
Tested by markus@, jason@ ok.
-rw-r--r-- | sys/net/pfkey.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/pfkey.c b/sys/net/pfkey.c index 64bd0234df3..1d3d09b3054 100644 --- a/sys/net/pfkey.c +++ b/sys/net/pfkey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfkey.c,v 1.11 2001/06/08 03:58:48 angelos Exp $ */ +/* $OpenBSD: pfkey.c,v 1.12 2002/12/11 21:48:40 fgsch Exp $ */ /* * @(#)COPYRIGHT 1.1 (NRL) 17 January 1995 @@ -140,7 +140,7 @@ pfkey_sendup(struct socket *socket, struct mbuf *packet, int more) int s; if (more) { - if (!(packet2 = m_copym(packet, 0, M_COPYALL, M_DONTWAIT))) + if (!(packet2 = m_copym2(packet, 0, M_COPYALL, M_DONTWAIT))) return ENOMEM; } else packet2 = packet; |