Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7]: src/sys/dev/usb Pull up following revision(s) (requested by j...
details: https://anonhg.NetBSD.org/src/rev/94ed25393ac0
branches: netbsd-7
changeset: 798374:94ed25393ac0
user: martin <martin%NetBSD.org@localhost>
date: Mon Sep 22 11:11:10 2014 +0000
description:
Pull up following revision(s) (requested by jmcneill in ticket #113):
sys/dev/usb/if_smsc.c: revision 1.22
if the pkt length in rx header is < ETHER_HDR_LEN, drop it
diffstat:
sys/dev/usb/if_smsc.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diffs (23 lines):
diff -r f3c588eb416e -r 94ed25393ac0 sys/dev/usb/if_smsc.c
--- a/sys/dev/usb/if_smsc.c Mon Sep 22 11:04:05 2014 +0000
+++ b/sys/dev/usb/if_smsc.c Mon Sep 22 11:11:10 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_smsc.c,v 1.19 2014/08/10 16:44:36 tls Exp $ */
+/* $NetBSD: if_smsc.c,v 1.19.2.1 2014/09/22 11:11:10 martin Exp $ */
/* $OpenBSD: if_smsc.c,v 1.4 2012/09/27 12:38:11 jsg Exp $ */
/* $FreeBSD: src/sys/dev/usb/net/if_smsc.c,v 1.1 2012/08/15 04:03:55 gonzo Exp $ */
@@ -1303,6 +1303,13 @@
smsc_dbg_printf(sc, "rxeof total_len %d pktlen %d rxhdr "
"0x%08x\n", total_len, pktlen, rxhdr);
+ if (pktlen < ETHER_HDR_LEN) {
+ smsc_dbg_printf(sc, "pktlen %d < ETHER_HDR_LEN %d\n",
+ pktlen, ETHER_HDR_LEN);
+ ifp->if_ierrors++;
+ goto done;
+ }
+
pktlen += ETHER_ALIGN;
if (pktlen > MCLBYTES) {
Home |
Main Index |
Thread Index |
Old Index