-/* $OpenBSD: ieee80211_pae_input.c,v 1.4 2008/08/02 08:20:16 damien Exp $ */
+/* $OpenBSD: ieee80211_pae_input.c,v 1.5 2008/08/02 08:25:59 damien Exp $ */
/*-
* Copyright (c) 2007,2008 Damien Bergamini <damien.bergamini@free.fr>
/* discard if we're not expecting this message */
if (ni->ni_rsn_gstate != RSNA_REKEYNEGOTIATING) {
- DPRINTF(("%s: unexpected in state: %d\n", ni->ni_rsn_state));
+ DPRINTF(("%s: unexpected in state: %d\n", ni->ni_rsn_gstate));
return;
}
if (BE_READ_8(key->replaycnt) != ni->ni_replaycnt) {
ic->ic_opmode != IEEE80211_M_IBSS)
return;
- info = BE_READ_2(key->info);
-
/* enforce monotonicity of key request replay counter */
if (ni->ni_reqreplaycnt_ok &&
BE_READ_8(key->replaycnt) <= ni->ni_reqreplaycnt) {
ic->ic_stats.is_rx_eapol_replay++;
return;
}
+ info = BE_READ_2(key->info);
+
if (!(info & EAPOL_KEY_KEYMIC) ||
ieee80211_eapol_key_check_mic(key, ni->ni_ptk.kck) != 0) {
DPRINTF(("key MIC failed\n"));