diff options
author | Damien Bergamini <damien@cvs.openbsd.org> | 2008-08-12 17:54:58 +0000 |
---|---|---|
committer | Damien Bergamini <damien@cvs.openbsd.org> | 2008-08-12 17:54:58 +0000 |
commit | 1b06988097fdb87bce838089b56ca96e50669573 (patch) | |
tree | 372dceddebd4ca701a8e3e0becd02cbdc1bfc76e /sys/net80211/ieee80211_crypto_ccmp.c | |
parent | 6fccd682905e04ff8ae8a517c028646215282faa (diff) |
in a near future, unicast management frames will be encrypted/decrypted
using CCMP. use the right replay counter in this case.
Diffstat (limited to 'sys/net80211/ieee80211_crypto_ccmp.c')
-rw-r--r-- | sys/net80211/ieee80211_crypto_ccmp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/net80211/ieee80211_crypto_ccmp.c b/sys/net80211/ieee80211_crypto_ccmp.c index 2dab94a1949..5638bfd95c5 100644 --- a/sys/net80211/ieee80211_crypto_ccmp.c +++ b/sys/net80211/ieee80211_crypto_ccmp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_crypto_ccmp.c,v 1.5 2008/08/12 16:45:44 damien Exp $ */ +/* $OpenBSD: ieee80211_crypto_ccmp.c,v 1.6 2008/08/12 17:54:57 damien Exp $ */ /*- * Copyright (c) 2008 Damien Bergamini <damien.bergamini@free.fr> @@ -359,8 +359,11 @@ ieee80211_ccmp_decrypt(struct ieee80211com *ic, struct mbuf *m0, tid = qwh->i_qos[0] & 0x0f; } prsc = &k->k_rsc[tid]; - } else + } else if ((wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) != + IEEE80211_FC0_TYPE_MGT) { prsc = &k->k_rsc[0]; + } else /* 11w: management frames have their own counters */ + prsc = &k->k_mgmt_rsc; /* extract the 48-bit PN from the CCMP header */ pn = (u_int64_t)ivp[0] | |