In m_pulldown avoid a prepend to the next mbuf in the chain if the result
would still not have all data we want continous. Fixes PR kern/30098.
This commit is contained in:
parent
bd55168e81
commit
e8c879147d
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: uipc_mbuf2.c,v 1.18 2005/02/26 21:34:55 perry Exp $ */
|
||||
/* $NetBSD: uipc_mbuf2.c,v 1.19 2005/05/06 09:40:40 martin Exp $ */
|
||||
/* $KAME: uipc_mbuf2.c,v 1.29 2001/02/14 13:42:10 itojun Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -62,7 +62,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf2.c,v 1.18 2005/02/26 21:34:55 perry Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf2.c,v 1.19 2005/05/06 09:40:40 martin Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -178,7 +178,7 @@ m_pulldown(struct mbuf *m, int off, int len, int *offp)
|
|||
goto ok;
|
||||
}
|
||||
if ((off == 0 || offp) && M_LEADINGSPACE(n->m_next) >= hlen &&
|
||||
!sharedcluster) {
|
||||
!sharedcluster && n->m_next->m_len >= tlen) {
|
||||
n->m_next->m_data -= hlen;
|
||||
n->m_next->m_len += hlen;
|
||||
memcpy(mtod(n->m_next, caddr_t), mtod(n, caddr_t) + off, hlen);
|
||||
|
|
Loading…
Reference in New Issue