Date: Wed, 2 Mar 2016 05:05:02 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r296304 - head/sys/dev/usb/net Message-ID: <201603020505.u22552Ud065860@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Wed Mar 2 05:05:02 2016 New Revision: 296304 URL: https://svnweb.freebsd.org/changeset/base/296304 Log: 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 Modified: head/sys/dev/usb/net/uhso.c Modified: head/sys/dev/usb/net/uhso.c ============================================================================== --- head/sys/dev/usb/net/uhso.c Wed Mar 2 05:04:04 2016 (r296303) +++ head/sys/dev/usb/net/uhso.c Wed Mar 2 05:05:02 2016 (r296304) @@ -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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201603020505.u22552Ud065860>