diff options
author | Damien Bergamini <damien@cvs.openbsd.org> | 2008-08-12 19:29:08 +0000 |
---|---|---|
committer | Damien Bergamini <damien@cvs.openbsd.org> | 2008-08-12 19:29:08 +0000 |
commit | 8972bfc0d22e8b7c5ba29982fdd4256f124523f9 (patch) | |
tree | b13e2085afaeef5975e7c034baefef0e733194b2 /sys/net80211/ieee80211_pae_input.c | |
parent | 5c58008f09042dd846a8f0fc982fa2920754ac6c (diff) |
new SHA-256 based AKMPs.
Diffstat (limited to 'sys/net80211/ieee80211_pae_input.c')
-rw-r--r-- | sys/net80211/ieee80211_pae_input.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/net80211/ieee80211_pae_input.c b/sys/net80211/ieee80211_pae_input.c index 9c46df076ef..3f841dfd78b 100644 --- a/sys/net80211/ieee80211_pae_input.c +++ b/sys/net80211/ieee80211_pae_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_pae_input.c,v 1.9 2008/08/12 18:22:41 damien Exp $ */ +/* $OpenBSD: ieee80211_pae_input.c,v 1.10 2008/08/12 19:29:07 damien Exp $ */ /*- * Copyright (c) 2007,2008 Damien Bergamini <damien.bergamini@free.fr> @@ -124,7 +124,12 @@ ieee80211_eapol_key_input(struct ieee80211com *ic, struct mbuf *m0, /* discard EAPOL-Key frames with an unknown descriptor version */ desc = info & EAPOL_KEY_VERSION_MASK; - if (desc != EAPOL_KEY_DESC_V1 && desc != EAPOL_KEY_DESC_V2) + if (desc < EAPOL_KEY_DESC_V1 || desc > EAPOL_KEY_DESC_V3) + goto done; + + if ((ni->ni_rsnakms == IEEE80211_AKM_SHA256_8021X || + ni->ni_rsnakms == IEEE80211_AKM_SHA256_PSK) && + desc != EAPOL_KEY_DESC_V3) goto done; if ((ni->ni_rsncipher == IEEE80211_CIPHER_CCMP || |