diff options
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ic/dc.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/sys/dev/ic/dc.c b/sys/dev/ic/dc.c index 2c51a4f1c9c..073b4f61d0e 100644 --- a/sys/dev/ic/dc.c +++ b/sys/dev/ic/dc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dc.c,v 1.5 2000/07/21 15:52:10 mickey Exp $ */ +/* $OpenBSD: dc.c,v 1.6 2000/08/02 08:40:54 peter Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -109,6 +109,7 @@ */ #include "bpfilter.h" +#include "vlan.h" #include <sys/param.h> #include <sys/systm.h> @@ -1715,7 +1716,17 @@ void dc_rxeof(sc) * it should simply get re-used next time this descriptor * comes up in the ring. */ - if (rxstat & DC_RXSTAT_RXERR) { + if (rxstat & DC_RXSTAT_RXERR +#if NVLAN > 0 + /* + * If VLANs are enabled, allow frames up to 4 bytes + * longer than the MTU. This should really check if + * the giant packet has a vlan tag + */ + && ((rxstat & (DC_RXSTAT_GIANT|DC_RXSTAT_LASTFRAG)) == 0 + && total_len <= ifp->if_mtu + 4) +#endif + ) { ifp->if_ierrors++; if (rxstat & DC_RXSTAT_COLLSEEN) ifp->if_collisions++; |