Date: Fri, 28 Sep 2012 15:33:13 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241033 - head/sys/dev/usb/net Message-ID: <201209281533.q8SFXDSa064351@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209281533.q8SFXDSa064351>