diff options
author | Damien Bergamini <damien@cvs.openbsd.org> | 2006-08-23 16:16:40 +0000 |
---|---|---|
committer | Damien Bergamini <damien@cvs.openbsd.org> | 2006-08-23 16:16:40 +0000 |
commit | 21fa8b064fb59b49efafd5ef82adb79bb1190ff8 (patch) | |
tree | abe15a6b22714b36a6939e8278473dd714dee582 /sys | |
parent | 053d9ad87e0dd7eb9322a1da396b2b5a72571375 (diff) |
in rum_rxeof(), don't check xfer length against IEEE80211_MIN_LEN since
the CRC is not included in the xfer.
check against sizeof(struct ieee80211_frame_min) instead.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/usb/if_rum.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/usb/if_rum.c b/sys/dev/usb/if_rum.c index 9a3d6fdb09f..9c26d0d5fdd 100644 --- a/sys/dev/usb/if_rum.c +++ b/sys/dev/usb/if_rum.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_rum.c,v 1.35 2006/08/18 16:04:56 damien Exp $ */ +/* $OpenBSD: if_rum.c,v 1.36 2006/08/23 16:16:39 damien Exp $ */ /*- * Copyright (c) 2005, 2006 Damien Bergamini <damien.bergamini@free.fr> @@ -784,7 +784,7 @@ rum_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) usbd_get_xfer_status(xfer, NULL, NULL, &len, NULL); - if (len < RT2573_RX_DESC_SIZE + IEEE80211_MIN_LEN) { + if (len < RT2573_RX_DESC_SIZE + sizeof (struct ieee80211_frame_min)) { DPRINTF(("%s: xfer too short %d\n", USBDEVNAME(sc->sc_dev), len)); ifp->if_ierrors++; @@ -2095,6 +2095,7 @@ rum_prepare_beacon(struct rum_softc *sc) m0->m_pkthdr.len); m_freem(m0); + return 0; } |