summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordamien <damien@openbsd.org>2005-07-12 18:18:13 +0000
committerdamien <damien@openbsd.org>2005-07-12 18:18:13 +0000
commit5c00fbe5e75d1387c1ba88aad2962d3fe7fccd9c (patch)
tree15492f468c9e8691b5d5166833f01603c0e7c830
parentdefault mtu to no more than ETHERMTU to avoid fragmentation; henning@ ok (diff)
downloadwireguard-openbsd-5c00fbe5e75d1387c1ba88aad2962d3fe7fccd9c.tar.xz
wireguard-openbsd-5c00fbe5e75d1387c1ba88aad2962d3fe7fccd9c.zip
h/w doesn't decrypt rx frames in monitor mode so don't try to remove the
iv and crc fields or to clear the wep bit from the 802.11 header. fix by Pedro la Peu. closes kern/4284.
-rw-r--r--sys/dev/pci/if_iwi.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/pci/if_iwi.c b/sys/dev/pci/if_iwi.c
index f711ed84551..dff8e1e4c41 100644
--- a/sys/dev/pci/if_iwi.c
+++ b/sys/dev/pci/if_iwi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwi.c,v 1.46 2005/07/02 23:10:11 brad Exp $ */
+/* $OpenBSD: if_iwi.c,v 1.47 2005/07/12 18:18:13 damien Exp $ */
/*-
* Copyright (c) 2004, 2005
@@ -760,7 +760,8 @@ iwi_frame_intr(struct iwi_softc *sc, struct iwi_rx_buf *buf, int i,
m_adj(m, sizeof (struct iwi_hdr) + sizeof (struct iwi_frame));
wh = mtod(m, struct ieee80211_frame *);
- if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
+ if ((wh->i_fc[1] & IEEE80211_FC1_WEP) &&
+ ic->ic_opmode != IEEE80211_M_MONITOR) {
/*
* Hardware decrypts the frame itself but leaves the WEP bit
* set in the 802.11 header and don't remove the iv and crc