summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2021-05-11 08:46:32 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2021-05-11 08:46:32 +0000
commit3d0feca0bbd3ccfc53bad696a623886ebc6fb9d5 (patch)
tree1b28b7998e5d2bebe8f5adec58b7038483bfc978
parent768a5ab0f4cecd1da9d2771fd4069e303fb1253a (diff)
During a "key unset for sw crypto" panic, display more meta-data
about the offending key. This will hopefully help with debugging.
-rw-r--r--sys/net80211/ieee80211_crypto.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/net80211/ieee80211_crypto.c b/sys/net80211/ieee80211_crypto.c
index 037aca21138..f13b535c7cb 100644
--- a/sys/net80211/ieee80211_crypto.c
+++ b/sys/net80211/ieee80211_crypto.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_crypto.c,v 1.77 2020/12/10 12:53:03 stsp Exp $ */
+/* $OpenBSD: ieee80211_crypto.c,v 1.78 2021/05/11 08:46:31 stsp Exp $ */
/*-
* Copyright (c) 2008 Damien Bergamini <damien.bergamini@free.fr>
@@ -258,7 +258,8 @@ ieee80211_encrypt(struct ieee80211com *ic, struct mbuf *m0,
struct ieee80211_key *k)
{
if ((k->k_flags & IEEE80211_KEY_SWCRYPTO) == 0)
- panic("%s: key unset for sw crypto: %d", __func__, k->k_id);
+ panic("%s: key unset for sw crypto: id=%d cipher=%d flags=0x%x",
+ __func__, k->k_id, k->k_cipher, k->k_flags);
switch (k->k_cipher) {
case IEEE80211_CIPHER_WEP40: