From b7a49a7b951a0f3072d9217d13318fa25188a69b Mon Sep 17 00:00:00 2001 From: krw Date: Wed, 3 Nov 2021 11:52:59 +0000 Subject: [PATCH] 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@ --- sys/net80211/ieee80211_node.c | 5 +++-- 1 file 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; -- 2.20.1