Module Name: src Committed By: pooka Date: Fri Jun 14 05:59:51 UTC 2013
Modified Files: src/sys/rump/net/lib/libshmif: if_shmem.c Log Message: sauce previous with a comment To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/sys/rump/net/lib/libshmif/if_shmem.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/rump/net/lib/libshmif/if_shmem.c diff -u src/sys/rump/net/lib/libshmif/if_shmem.c:1.55 src/sys/rump/net/lib/libshmif/if_shmem.c:1.56 --- src/sys/rump/net/lib/libshmif/if_shmem.c:1.55 Fri Jun 14 05:56:29 2013 +++ src/sys/rump/net/lib/libshmif/if_shmem.c Fri Jun 14 05:59:50 2013 @@ -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 @@ shmif_rcv(void *arg) 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));