summaryrefslogtreecommitdiffstats
path: root/sys/netinet6
diff options
context:
space:
mode:
authorbmilekic <bmilekic@FreeBSD.org>2000-11-11 23:07:38 +0000
committerbmilekic <bmilekic@FreeBSD.org>2000-11-11 23:07:38 +0000
commitb5361355078b6871dd75bcdf6207542ec139d69b (patch)
treef288ac99760023f0e62ebc100c516a84424b218b /sys/netinet6
parent22569f9f9638cf65887c878f12bf35e617fd8e17 (diff)
downloadFreeBSD-src-b5361355078b6871dd75bcdf6207542ec139d69b.zip
FreeBSD-src-b5361355078b6871dd75bcdf6207542ec139d69b.tar.gz
Change check from mbuf->m_ext.ext_free to use the new ext_type in order
to determine whether the given mbuf has a cluster (or some other type of external storage) attached to it. Note: This code should eventually be made to use M_WRITABLE() to determine whether or not a copy should be made. Reviewed by: jlemon
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/ipsec.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/netinet6/ipsec.c b/sys/netinet6/ipsec.c
index 87e771f..33a66cc 100644
--- a/sys/netinet6/ipsec.c
+++ b/sys/netinet6/ipsec.c
@@ -3219,14 +3219,11 @@ ipsec_copypkt(m)
for (n = m, mpp = &m; n; n = n->m_next) {
if (n->m_flags & M_EXT) {
/*
- * Make a copy only if there are more than one references
- * to the cluster.
+ * Make a copy only if there are more than one
+ * references to the cluster.
* XXX: is this approach effective?
*/
- if (
- n->m_ext.ext_free ||
- MEXT_IS_REF(n)
- )
+ if (n->m_ext.ext_type != EXT_CLUSTER || MEXT_IS_REF(n))
{
int remain, copied;
struct mbuf *mm;
OpenPOWER on IntegriCloud