add tid param to ieee80211_notify_replay_failure to get the correct rsc

This commit is contained in:
Sam Leffler 2009-06-05 23:10:30 +00:00
parent 12be48a216
commit ebaf87eb03
4 changed files with 6 additions and 6 deletions

View File

@ -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) */

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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));