On Tue, Apr 27, 2021 at 06:36:32PM +0000, Mikolaj Kucharski wrote:
> I got it again, but had official snapshot, so I don't have more info
> than I had in the past, but I would like to share it anyway..

> ddb{0}> show panic
> ieee80211_encrypt: key unset for sw crypto: 0

It would be nice to have more information about the bad key.
Could you run with this?

diff 87962d75d1c1a416b89e927cd4ab8e3327a47509 /usr/src
blob - 037aca21138df15a4b0b8ec2a96afd8d67c5e3cc
file + sys/net80211/ieee80211_crypto.c
--- sys/net80211/ieee80211_crypto.c
+++ sys/net80211/ieee80211_crypto.c
@@ -257,8 +257,10 @@ struct mbuf *
 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);
+       if ((k->k_flags & IEEE80211_KEY_SWCRYPTO) == 0) {
+               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:

Reply via email to