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
This commit is contained in:
Bosko Milekic 2000-11-11 23:07:38 +00:00
parent 0a1df235ba
commit 15072affc8

View File

@ -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;