diff options
author | sam <sam@FreeBSD.org> | 2007-09-05 20:22:59 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2007-09-05 20:22:59 +0000 |
commit | 31b9300aaae2359c1de8a4289e294f0ad852dab2 (patch) | |
tree | 2dcfdf9504803541734b66b2ffdcdd397f4f1224 /sys/net80211/ieee80211_input.c | |
parent | ef86a72db612f7100b57704e0c0f097cb3c1b6a0 (diff) | |
download | FreeBSD-src-31b9300aaae2359c1de8a4289e294f0ad852dab2.zip FreeBSD-src-31b9300aaae2359c1de8a4289e294f0ad852dab2.tar.gz |
o add M_WEP mbuf flag so drivers can mark frames that are decrypted by the
device and have had the crypto bits stripped from the 802.11 header
o strip mbuf flags in the rx path before passing up the stack
Reviewed by: thompsa, sephe, avatar
Approved by: re (blanket wireless)
Diffstat (limited to 'sys/net80211/ieee80211_input.c')
-rw-r--r-- | sys/net80211/ieee80211_input.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c index d756041..b8f70dc 100644 --- a/sys/net80211/ieee80211_input.c +++ b/sys/net80211/ieee80211_input.c @@ -393,6 +393,7 @@ ieee80211_input(struct ieee80211com *ic, struct mbuf *m, wh = mtod(m, struct ieee80211_frame *); wh->i_fc[1] &= ~IEEE80211_FC1_WEP; } else { + /* XXX M_WEP and IEEE80211_F_PRIVACY */ key = NULL; } @@ -474,7 +475,7 @@ ieee80211_input(struct ieee80211com *ic, struct mbuf *m, * any non-PAE frames received without encryption. */ if ((ic->ic_flags & IEEE80211_F_DROPUNENC) && - key == NULL && + (key == NULL && (m->m_flags & M_WEP) == 0) && eh->ether_type != htons(ETHERTYPE_PAE)) { /* * Drop unencrypted frames. @@ -722,6 +723,9 @@ ieee80211_deliver_data(struct ieee80211com *ic, } else IEEE80211_NODE_STAT(ni, rx_ucast); + /* clear driver/net80211 flags before passing up */ + m->m_flags &= ~M_80211_RX; + /* perform as a bridge within the AP */ if (ic->ic_opmode == IEEE80211_M_HOSTAP && (ic->ic_flags & IEEE80211_F_NOBRIDGE) == 0) { |