diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2021-11-03 11:53:00 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2021-11-03 11:53:00 +0000 |
commit | 938142c6c32768a3eed407699cac7e679d5e1fdb (patch) | |
tree | d3b018154bc7e9bd01400c003365ae5dc2f7df32 /sys | |
parent | c02bae547c23f37490c5907229c29e764ee46307 (diff) |
In addition to the WEP key(s) being set at device initialization with
'nwid'/'nwkey', the keys will be set at random times when 'join'/'nwkey' is
used. So also stop trying to set IEEE80211_CIPHER_NONE keys on that path.
James Hastings confirms this fixes his '(null node)' panics on run(4). Thanks!
ok stsp@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net80211/ieee80211_node.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index 2fe4984654e..116d71f94d6 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_node.c,v 1.187 2021/10/08 09:22:10 stsp Exp $ */ +/* $OpenBSD: ieee80211_node.c,v 1.188 2021/11/03 11:52:59 krw Exp $ */ /* $NetBSD: ieee80211_node.c,v 1.14 2004/05/09 09:18:47 dyoung Exp $ */ /*- @@ -667,7 +667,8 @@ ieee80211_set_ess(struct ieee80211com *ic, struct ieee80211_ess *ess, (*ic->ic_delete_key)(ic, NULL, k); memcpy(&ic->ic_nw_keys[i], &ess->nw_keys[i], sizeof(struct ieee80211_key)); - (*ic->ic_set_key)(ic, NULL, k); + if (k->k_cipher != IEEE80211_CIPHER_NONE) + (*ic->ic_set_key)(ic, NULL, k); } ic->ic_def_txkey = ess->def_txkey; ic->ic_flags |= IEEE80211_F_WEPON; |