From 2191bf51694b6ceabd06e7a02eff46b0b9cc2bb5 Mon Sep 17 00:00:00 2001 From: stsp Date: Tue, 11 May 2021 08:46:31 +0000 Subject: [PATCH] During a "key unset for sw crypto" panic, display more meta-data about the offending key. This will hopefully help with debugging. --- sys/net80211/ieee80211_crypto.c | 5 +++-- 1 file 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 @@ -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: -- 2.20.1