svn commit: r241033 - head/sys/dev/usb/net
Hans Petter Selasky
hselasky at FreeBSD.org
Fri Sep 28 15:33:14 UTC 2012
Author: hselasky
Date: Fri Sep 28 15:33:13 2012
New Revision: 241033
URL: http://svn.freebsd.org/changeset/base/241033
Log:
Remove some trailing bytes which are not part of the ethernet packet.
Discussed with: bgray @
Modified:
head/sys/dev/usb/net/if_smsc.c
Modified: head/sys/dev/usb/net/if_smsc.c
==============================================================================
--- head/sys/dev/usb/net/if_smsc.c Fri Sep 28 15:24:14 2012 (r241032)
+++ head/sys/dev/usb/net/if_smsc.c Fri Sep 28 15:33:13 2012 (r241033)
@@ -1042,7 +1042,9 @@ smsc_bulk_read_callback(struct usb_xfer
}
/* Finally enqueue the mbuf on the receive queue */
- uether_rxmbuf(ue, m, pktlen);
+ /* Remove 4 trailing bytes */
+ if (pktlen >= (4 + ETHER_HDR_LEN))
+ uether_rxmbuf(ue, m, pktlen - 4);
}
/* Update the offset to move to the next potential packet */
More information about the svn-src-head
mailing list