diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2002-12-11 21:48:41 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2002-12-11 21:48:41 +0000 |
commit | ffe9aa202ec71eb96cad569278090927639a9c8c (patch) | |
tree | 476cf4504ea199309718506dacdc3762c05fe505 /sys | |
parent | 47492d1c9d3dff0bdc6ba0d8efbd1d997e3b7657 (diff) |
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.
Diffstat (limited to 'sys')
-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; |