diff options
author | Bob Beck <beck@cvs.openbsd.org> | 2004-05-18 21:19:36 +0000 |
---|---|---|
committer | Bob Beck <beck@cvs.openbsd.org> | 2004-05-18 21:19:36 +0000 |
commit | bdf74c0b530f383102220f8cd8b606746db94abb (patch) | |
tree | 184032cce45558c7503d50919292c491d6e07d3a | |
parent | 29c63ef6d35795f4c719db2ca80e7f798ba3f8fb (diff) |
Check for and handle interface CRC errors.
testing by me, pval, nick, others...
ok jason@, marco@
-rw-r--r-- | sys/dev/ic/fxp.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/dev/ic/fxp.c b/sys/dev/ic/fxp.c index 1cc6161496c..5f21acb2b59 100644 --- a/sys/dev/ic/fxp.c +++ b/sys/dev/ic/fxp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fxp.c,v 1.51 2004/05/12 06:35:10 tedu Exp $ */ +/* $OpenBSD: fxp.c,v 1.52 2004/05/18 21:19:35 beck Exp $ */ /* $NetBSD: if_fxp.c,v 1.2 1997/06/05 02:01:55 thorpej Exp $ */ /* @@ -847,6 +847,14 @@ rcvloop: m_freem(m); goto rcvloop; } + if (*(u_int16_t *)(rfap + + offsetof(struct fxp_rfa, + rfa_status)) & + htole16(FXP_RFA_STATUS_CRC)) { + m_freem(m); + goto rcvloop; + } + m->m_pkthdr.rcvif = ifp; m->m_pkthdr.len = m->m_len = total_len; |