summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorchuck <chuck@cvs.openbsd.org>1997-01-24 20:57:53 +0000
committerchuck <chuck@cvs.openbsd.org>1997-01-24 20:57:53 +0000
commit4349bf86b048a36b5e2c68ad3c2263b4d5b7e7e9 (patch)
tree0776911b2d1c83657d0af4d96ea407c1654d6296 /sys/dev/ic
parent0ef244d8476654749f2eaf9441dc06b2fd4d4f7b (diff)
bug fix:
- if aal5 frame has a CRC error then the length field in the aal5 trailer may not be valid, so we can not use it [and we must dump the frame] [Yuhang Sun <sunyh@dworkin.wustl.edu> & chuck@ccrc.wustl.edu]
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/midway.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/ic/midway.c b/sys/dev/ic/midway.c
index b9376231650..dac68671317 100644
--- a/sys/dev/ic/midway.c
+++ b/sys/dev/ic/midway.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: midway.c,v 1.18 1996/11/21 20:53:04 chuck Exp $ */
-/* (sync'd to midway.c 1.64) */
+/* $OpenBSD: midway.c,v 1.19 1997/01/24 20:57:52 chuck Exp $ */
+/* (sync'd to midway.c 1.65) */
/*
*
@@ -2443,8 +2443,8 @@ defer: /* defer processing */
pdu -= (EN_RXSZ*1024);
pdu = EN_READ(sc, pdu); /* READ swaps to proper byte order */
fill = tlen - MID_RBD_SIZE - MID_PDU_LEN(pdu);
- if (fill < 0) {
- printf("%s: invalid AAL5 PDU length detected, dropping frame\n",
+ if (fill < 0 || (rbd & MID_RBD_CRCERR) != 0) {
+ printf("%s: invalid AAL5 PDU length or CRC detected, dropping frame\n",
sc->sc_dev.dv_xname);
printf("%s: got %d cells (%d bytes), AAL5 len is %d bytes (pdu=0x%x)\n",
sc->sc_dev.dv_xname, MID_RBD_CNT(rbd), tlen - MID_RBD_SIZE,