summaryrefslogtreecommitdiff
path: root/sys/net80211
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2018-04-28 14:45:29 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2018-04-28 14:45:29 +0000
commit9f0aedb0dc64aca029ede692d6413fbf7aa50814 (patch)
treee141083b4e98f285363f051ceb92203c077fb5d9 /sys/net80211
parent590d14fcca48845da95087b7bfbd765b4d24da01 (diff)
If ieee80211_encrypt() is passed a key with an unrecognized cipher
type then panic immediately instead of silently dropping packets. ok phessler@
Diffstat (limited to 'sys/net80211')
-rw-r--r--sys/net80211/ieee80211_crypto.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/net80211/ieee80211_crypto.c b/sys/net80211/ieee80211_crypto.c
index db68889c548..e618e1d4b1d 100644
--- a/sys/net80211/ieee80211_crypto.c
+++ b/sys/net80211/ieee80211_crypto.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_crypto.c,v 1.71 2017/08/18 17:30:12 stsp Exp $ */
+/* $OpenBSD: ieee80211_crypto.c,v 1.72 2018/04/28 14:45:28 stsp Exp $ */
/*-
* Copyright (c) 2008 Damien Bergamini <damien.bergamini@free.fr>
@@ -225,8 +225,7 @@ ieee80211_encrypt(struct ieee80211com *ic, struct mbuf *m0,
break;
default:
/* should not get there */
- m_freem(m0);
- m0 = NULL;
+ panic("invalid key cipher 0x%x", k->k_cipher);
}
return m0;
}