summaryrefslogtreecommitdiff
path: root/sys/net80211
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2018-04-27 15:33:50 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2018-04-27 15:33:50 +0000
commitc658f6d4973680caff6b62cb303f6c663eb0d0f9 (patch)
tree9a878890e83b024d3f94c02cf5c26485e921b088 /sys/net80211
parent5e793bc965b75b2027b433b83429d7754811a2a1 (diff)
Fix WEP.
Clear group keys in iee80211_newstate only if we're doing WPA. Otherwise, ieee80211_crypto_clear_groupkeys() will clear WEP keys configured by userland before associating. (All WEP keys are group keys.) ok phessler@ tb@ pirofti@
Diffstat (limited to 'sys/net80211')
-rw-r--r--sys/net80211/ieee80211_proto.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/net80211/ieee80211_proto.c b/sys/net80211/ieee80211_proto.c
index 4e5a78dbd46..918c75a6172 100644
--- a/sys/net80211/ieee80211_proto.c
+++ b/sys/net80211/ieee80211_proto.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_proto.c,v 1.83 2018/02/06 22:14:52 phessler Exp $ */
+/* $OpenBSD: ieee80211_proto.c,v 1.84 2018/04/27 15:33:49 stsp Exp $ */
/* $NetBSD: ieee80211_proto.c,v 1.8 2004/04/30 23:58:20 dyoung Exp $ */
/*-
@@ -948,7 +948,8 @@ justcleanup:
break;
}
ni->ni_rsn_supp_state = RSNA_SUPP_INITIALIZE;
- ieee80211_crypto_clear_groupkeys(ic);
+ if (ic->ic_flags & IEEE80211_F_RSNON)
+ ieee80211_crypto_clear_groupkeys(ic);
break;
case IEEE80211_S_SCAN:
ic->ic_flags &= ~IEEE80211_F_SIBSS;
@@ -960,7 +961,8 @@ justcleanup:
ni->ni_associd = 0;
ni->ni_rstamp = 0;
ni->ni_rsn_supp_state = RSNA_SUPP_INITIALIZE;
- ieee80211_crypto_clear_groupkeys(ic);
+ if (ic->ic_flags & IEEE80211_F_RSNON)
+ ieee80211_crypto_clear_groupkeys(ic);
switch (ostate) {
case IEEE80211_S_INIT:
#ifndef IEEE80211_STA_ONLY
@@ -1006,7 +1008,8 @@ justcleanup:
break;
case IEEE80211_S_AUTH:
ni->ni_rsn_supp_state = RSNA_SUPP_INITIALIZE;
- ieee80211_crypto_clear_groupkeys(ic);
+ if (ic->ic_flags & IEEE80211_F_RSNON)
+ ieee80211_crypto_clear_groupkeys(ic);
switch (ostate) {
case IEEE80211_S_INIT:
if (ifp->if_flags & IFF_DEBUG)