Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/net/lib/libshmif sauce previous with a comment
details: https://anonhg.NetBSD.org/src/rev/62156698a6a2
branches: trunk
changeset: 787378:62156698a6a2
user: pooka <pooka%NetBSD.org@localhost>
date: Fri Jun 14 05:59:50 2013 +0000
description:
sauce previous with a comment
diffstat:
sys/rump/net/lib/libshmif/if_shmem.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (29 lines):
diff -r 3362cbad7af6 -r 62156698a6a2 sys/rump/net/lib/libshmif/if_shmem.c
--- a/sys/rump/net/lib/libshmif/if_shmem.c Fri Jun 14 05:56:29 2013 +0000
+++ b/sys/rump/net/lib/libshmif/if_shmem.c Fri Jun 14 05:59:50 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_shmem.c,v 1.55 2013/06/14 05:56:29 pooka Exp $ */
+/* $NetBSD: if_shmem.c,v 1.56 2013/06/14 05:59:50 pooka Exp $ */
/*
* Copyright (c) 2009, 2010 Antti Kantee. All Rights Reserved.
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_shmem.c,v 1.55 2013/06/14 05:56:29 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_shmem.c,v 1.56 2013/06/14 05:59:50 pooka Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -724,6 +724,10 @@
sc, sc->sc_devgen));
}
+ /*
+ * Ignore packets too short to possibly be valid.
+ * This is hit at least for the first frame on a new bus.
+ */
if (__predict_false(sp.sp_len < ETHER_HDR_LEN)) {
DPRINTF(("shmif read packet len %d < ETHER_HDR_LEN\n",
sp.sp_len));
Home |
Main Index |
Thread Index |
Old Index