From 15072affc8fb9b2cb6839c49989368f987194ec7 Mon Sep 17 00:00:00 2001 From: Bosko Milekic Date: Sat, 11 Nov 2000 23:07:38 +0000 Subject: 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 --- sys/netinet6/ipsec.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/sys/netinet6/ipsec.c b/sys/netinet6/ipsec.c index 87e771f227d4..33a66cc92b1b 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; -- cgit v1.3