diff options
author | 2004-05-18 21:19:35 +0000 | |
---|---|---|
committer | 2004-05-18 21:19:35 +0000 | |
commit | 7fbd829ebe8fa59792482a148653ae53386edcd5 (patch) | |
tree | be8aec76fa79fe56dacad2a2546dee883ca48a2a | |
parent | if_ether.h (diff) | |
download | wireguard-openbsd-7fbd829ebe8fa59792482a148653ae53386edcd5.tar.xz wireguard-openbsd-7fbd829ebe8fa59792482a148653ae53386edcd5.zip |
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; |