svn commit: r296304 - head/sys/dev/usb/net
Mark Johnston
markj at FreeBSD.org
Wed Mar 2 05:05:04 UTC 2016
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);
More information about the svn-src-all
mailing list