diff options
-rw-r--r-- | sys/net80211/ieee80211_crypto_tkip.c | 9 | ||||
-rw-r--r-- | sys/net80211/ieee80211_var.h | 3 |
2 files changed, 8 insertions, 4 deletions
diff --git a/sys/net80211/ieee80211_crypto_tkip.c b/sys/net80211/ieee80211_crypto_tkip.c index 0475d7b6dfa..47d5f348b43 100644 --- a/sys/net80211/ieee80211_crypto_tkip.c +++ b/sys/net80211/ieee80211_crypto_tkip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_crypto_tkip.c,v 1.10 2008/11/13 08:37:19 djm Exp $ */ +/* $OpenBSD: ieee80211_crypto_tkip.c,v 1.11 2008/11/13 13:42:35 djm Exp $ */ /*- * Copyright (c) 2008 Damien Bergamini <damien.bergamini@free.fr> @@ -519,9 +519,9 @@ ieee80211_michael_mic_failure(struct ieee80211com *ic, u_int64_t tsc) if (ic->ic_tkip_micfail == 0 || ticks >= ic->ic_tkip_micfail + 60 * hz) { ic->ic_tkip_micfail = ticks; + ic->ic_tkip_micfail_last_tsc = tsc; return; } - ic->ic_tkip_micfail = ticks; switch (ic->ic_opmode) { #ifndef IEEE80211_STA_ONLY @@ -541,7 +541,7 @@ ieee80211_michael_mic_failure(struct ieee80211com *ic, u_int64_t tsc) */ (void)ieee80211_send_eapol_key_req(ic, ic->ic_bss, EAPOL_KEY_KEYMIC | EAPOL_KEY_ERROR | EAPOL_KEY_SECURE, - tsc); + ic->ic_tkip_micfail_last_tsc); (void)ieee80211_send_eapol_key_req(ic, ic->ic_bss, EAPOL_KEY_KEYMIC | EAPOL_KEY_ERROR | EAPOL_KEY_SECURE, tsc); @@ -556,6 +556,9 @@ ieee80211_michael_mic_failure(struct ieee80211com *ic, u_int64_t tsc) default: break; } + + ic->ic_tkip_micfail = ticks; + ic->ic_tkip_micfail_last_tsc = tsc; } /*********************************************************************** diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h index 45123db4414..5ca29ad46d5 100644 --- a/sys/net80211/ieee80211_var.h +++ b/sys/net80211/ieee80211_var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_var.h,v 1.54 2008/09/27 15:16:09 damien Exp $ */ +/* $OpenBSD: ieee80211_var.h,v 1.55 2008/11/13 13:42:35 djm Exp $ */ /* $NetBSD: ieee80211_var.h,v 1.7 2004/05/06 03:07:10 dyoung Exp $ */ /*- @@ -277,6 +277,7 @@ struct ieee80211com { struct timeout ic_rsn_timeout; u_int16_t ic_rsn_keydonesta; int ic_tkip_micfail; + u_int64_t ic_tkip_micfail_last_tsc; TAILQ_HEAD(, ieee80211_pmk) ic_pmksa; /* PMKSA cache */ u_int ic_rsnprotos; |