1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-02-05 18:05:16 +00:00

Use m_catpkt(9) to ensure that pkthdr fields are updated properly.

Reviewed by:	glebius
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D5497
This commit is contained in:
Mark Johnston 2016-03-02 05:05:02 +00:00
parent 3543e138e5
commit 925bcbd658
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=296304

View File

@ -1666,7 +1666,7 @@ uhso_if_rxflush(void *arg)
struct ip6_hdr *ip6;
#endif
uint16_t iplen;
int len, isr;
int isr;
m = NULL;
mwait = sc->sc_mwait;
@ -1686,13 +1686,8 @@ uhso_if_rxflush(void *arg)
UHSO_DPRINTF(3, "partial m0=%p(%d), concat w/ m=%p(%d)\n",
m0, m0->m_len, m, m->m_len);
len = m->m_len + m0->m_len;
/* Concat mbufs and fix headers */
m_cat(m0, m);
m0->m_pkthdr.len = len;
m->m_flags &= ~M_PKTHDR;
m_catpkt(m0, m);
m = m_pullup(m0, sizeof(struct ip));
if (m == NULL) {
if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);