diff options
author | sam <sam@FreeBSD.org> | 2009-06-05 23:10:30 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2009-06-05 23:10:30 +0000 |
commit | ef7ab5a79a83c99ff76ffc0c90b36dcc4aeb1dd6 (patch) | |
tree | 0fb8b6c5d140c11ae2ba765908f2a037628646a1 | |
parent | 2e047fc0c8ebcd44760556819bbc637aa30d3b8b (diff) | |
download | FreeBSD-src-ef7ab5a79a83c99ff76ffc0c90b36dcc4aeb1dd6.zip FreeBSD-src-ef7ab5a79a83c99ff76ffc0c90b36dcc4aeb1dd6.tar.gz |
add tid param to ieee80211_notify_replay_failure to get the correct rsc
-rw-r--r-- | sys/net80211/ieee80211_crypto.h | 2 | ||||
-rw-r--r-- | sys/net80211/ieee80211_crypto_ccmp.c | 2 | ||||
-rw-r--r-- | sys/net80211/ieee80211_crypto_tkip.c | 2 | ||||
-rw-r--r-- | sys/net80211/ieee80211_freebsd.c | 6 |
4 files changed, 6 insertions, 6 deletions
diff --git a/sys/net80211/ieee80211_crypto.h b/sys/net80211/ieee80211_crypto.h index 3f8f64e..dde2c46 100644 --- a/sys/net80211/ieee80211_crypto.h +++ b/sys/net80211/ieee80211_crypto.h @@ -236,7 +236,7 @@ ieee80211_crypto_resetkey(struct ieee80211vap *vap, */ void ieee80211_notify_replay_failure(struct ieee80211vap *, const struct ieee80211_frame *, const struct ieee80211_key *, - uint64_t rsc); + uint64_t rsc, int tid); void ieee80211_notify_michael_failure(struct ieee80211vap *, const struct ieee80211_frame *, u_int keyix); #endif /* defined(__KERNEL__) || defined(_KERNEL) */ diff --git a/sys/net80211/ieee80211_crypto_ccmp.c b/sys/net80211/ieee80211_crypto_ccmp.c index c2e9486..c969dae 100644 --- a/sys/net80211/ieee80211_crypto_ccmp.c +++ b/sys/net80211/ieee80211_crypto_ccmp.c @@ -230,7 +230,7 @@ ccmp_decap(struct ieee80211_key *k, struct mbuf *m, int hdrlen) /* * Replay violation. */ - ieee80211_notify_replay_failure(vap, wh, k, pn); + ieee80211_notify_replay_failure(vap, wh, k, pn, tid); vap->iv_stats.is_rx_ccmpreplay++; return 0; } diff --git a/sys/net80211/ieee80211_crypto_tkip.c b/sys/net80211/ieee80211_crypto_tkip.c index b20946a..f949255 100644 --- a/sys/net80211/ieee80211_crypto_tkip.c +++ b/sys/net80211/ieee80211_crypto_tkip.c @@ -284,7 +284,7 @@ tkip_decap(struct ieee80211_key *k, struct mbuf *m, int hdrlen) /* * Replay violation; notify upper layer. */ - ieee80211_notify_replay_failure(vap, wh, k, ctx->rx_rsc); + ieee80211_notify_replay_failure(vap, wh, k, ctx->rx_rsc, tid); vap->iv_stats.is_rx_tkipreplay++; return 0; } diff --git a/sys/net80211/ieee80211_freebsd.c b/sys/net80211/ieee80211_freebsd.c index 47a76bb..ee3022f 100644 --- a/sys/net80211/ieee80211_freebsd.c +++ b/sys/net80211/ieee80211_freebsd.c @@ -528,14 +528,14 @@ ieee80211_notify_scan_done(struct ieee80211vap *vap) void ieee80211_notify_replay_failure(struct ieee80211vap *vap, const struct ieee80211_frame *wh, const struct ieee80211_key *k, - u_int64_t rsc) + u_int64_t rsc, int tid) { struct ifnet *ifp = vap->iv_ifp; IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_CRYPTO, wh->i_addr2, "%s replay detected <rsc %ju, csc %ju, keyix %u rxkeyix %u>", k->wk_cipher->ic_name, (intmax_t) rsc, - (intmax_t) k->wk_keyrsc[IEEE80211_NONQOS_TID], + (intmax_t) k->wk_keyrsc[tid], k->wk_keyix, k->wk_rxkeyix); if (ifp != NULL) { /* NB: for cipher test modules */ @@ -548,7 +548,7 @@ ieee80211_notify_replay_failure(struct ieee80211vap *vap, iev.iev_keyix = k->wk_rxkeyix; else iev.iev_keyix = k->wk_keyix; - iev.iev_keyrsc = k->wk_keyrsc[0]; /* XXX need tid */ + iev.iev_keyrsc = k->wk_keyrsc[tid]; iev.iev_rsc = rsc; CURVNET_SET(ifp->if_vnet); rt_ieee80211msg(ifp, RTM_IEEE80211_REPLAY, &iev, sizeof(iev)); |