diff options
author | 2006-08-23 16:16:39 +0000 | |
---|---|---|
committer | 2006-08-23 16:16:39 +0000 | |
commit | 88fa525e47316005fffc8c2a45a999bb3a0f1106 (patch) | |
tree | 16750b83b065ead94ed35bfa7e3f043c48470782 /sys/dev/usb/if_rum.c | |
parent | regen (diff) | |
download | wireguard-openbsd-88fa525e47316005fffc8c2a45a999bb3a0f1106.tar.xz wireguard-openbsd-88fa525e47316005fffc8c2a45a999bb3a0f1106.zip |
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/dev/usb/if_rum.c')
-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; } |