From 3b1f97758a277bff4cc1443e974c284f24d06d5b Mon Sep 17 00:00:00 2001 From: bschmidt Date: Thu, 1 Jul 2010 20:50:12 +0000 Subject: - Introduce IEEE80211_KEY_NOREPLAY, a per-key flag to ignore replay violations. - Use SIOCGIFMEDIA to determine VAP's opmode, cache it and set IEEE80211_KEY_NOREPLAY for AHDEMO and IBSS. Approved by: rpaulo (mentor) --- sys/net80211/ieee80211_crypto_tkip.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'sys/net80211/ieee80211_crypto_tkip.c') diff --git a/sys/net80211/ieee80211_crypto_tkip.c b/sys/net80211/ieee80211_crypto_tkip.c index 0f17c17..05d9c74 100644 --- a/sys/net80211/ieee80211_crypto_tkip.c +++ b/sys/net80211/ieee80211_crypto_tkip.c @@ -281,14 +281,8 @@ tkip_decap(struct ieee80211_key *k, struct mbuf *m, int hdrlen) tid = ieee80211_gettid(wh); ctx->rx_rsc = READ_6(ivp[2], ivp[0], ivp[4], ivp[5], ivp[6], ivp[7]); - /* - * NB: Multiple stations are using the same key in - * IBSS mode, there is currently no way to sync keyrsc - * counters without discarding too many frames. - */ - if (vap->iv_opmode != IEEE80211_M_IBSS && - vap->iv_opmode != IEEE80211_M_AHDEMO && - ctx->rx_rsc <= k->wk_keyrsc[tid]) { + if (ctx->rx_rsc <= k->wk_keyrsc[tid] && + (k->wk_flags & IEEE80211_KEY_NOREPLAY) == 0) { /* * Replay violation; notify upper layer. */ -- cgit v1.1