From 591209718a1fafe114c9ed9b23a5167ecc0bc980 Mon Sep 17 00:00:00 2001 From: "Angelos D. Keromytis" Date: Sat, 26 May 2001 05:46:34 +0000 Subject: Fix backpointer. --- sys/kern/uipc_mbuf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sys') diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c index 7dac42cd002..28acb21f409 100644 --- a/sys/kern/uipc_mbuf.c +++ b/sys/kern/uipc_mbuf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_mbuf.c,v 1.32 2001/05/24 10:59:23 angelos Exp $ */ +/* $OpenBSD: uipc_mbuf.c,v 1.33 2001/05/26 05:46:33 angelos Exp $ */ /* $NetBSD: uipc_mbuf.c,v 1.15.4.1 1996/06/13 17:11:44 cgd Exp $ */ /* @@ -643,9 +643,9 @@ m_pullup2(n, len) register struct mbuf *m; register int count; int space; + if (len <= MHLEN) return m_pullup(n, len); - if ((n->m_flags & M_EXT) != 0 && n->m_data + len < &n->m_data[MCLBYTES] && n->m_next) { if (n->m_len >= len) @@ -668,6 +668,8 @@ m_pullup2(n, len) m->m_pkthdr = n->m_pkthdr; if (TAILQ_EMPTY(&n->m_pkthdr.tags)) TAILQ_INIT(&m->m_pkthdr.tags); + else + TAILQ_FIRST(&m->m_pkthdr.tags)->m_tag_link.tqe_prev = &m->m_pkthdr.tags.tqh_first; m->m_flags = (n->m_flags & M_COPYFLAGS) | M_EXT; n->m_flags &= ~M_PKTHDR; TAILQ_INIT(&n->m_pkthdr.tags); -- cgit v1.2.3