Page MenuHomeFreeBSD

D49393.diff
No OneTemporary

D49393.diff

diff --git a/sys/net80211/ieee80211_crypto.c b/sys/net80211/ieee80211_crypto.c
--- a/sys/net80211/ieee80211_crypto.c
+++ b/sys/net80211/ieee80211_crypto.c
@@ -397,6 +397,21 @@
__func__, cip->ic_name);
flags |= IEEE80211_KEY_SWCRYPT;
}
+ /*
+ * Check if the software cipher is available; if not then
+ * fail it early.
+ *
+ * Some devices do not support all ciphers in software
+ * (for example they don't support a "raw" data path.)
+ */
+ if ((flags & IEEE80211_KEY_SWCRYPT) &&
+ (ic->ic_sw_cryptocaps & (1<<cipher)) == 0) {
+ IEEE80211_DPRINTF(vap, IEEE80211_MSG_CRYPTO,
+ "%s: no s/w support for cipher %s, rejecting\n",
+ __func__, cip->ic_name);
+ vap->iv_stats.is_crypto_swcipherfail++;
+ return (0);
+ }
/*
* Hardware TKIP with software MIC is an important
* combination; we handle it by flagging each key,
diff --git a/sys/net80211/ieee80211_ioctl.h b/sys/net80211/ieee80211_ioctl.h
--- a/sys/net80211/ieee80211_ioctl.h
+++ b/sys/net80211/ieee80211_ioctl.h
@@ -259,6 +259,7 @@
uint32_t is_rx_gcmpmic; /* rx MIC check failed (GCMP) */
uint32_t is_crypto_gcmp_nomem; /* gcmp crypto failed; no mem */
uint32_t is_crypto_gcmp_nospc; /* gcmp crypto failed; no mbuf space */
+ uint32_t is_crypto_swcipherfail; /* no support for SW cipher */
uint32_t is_spare[5];
};

File Metadata

Mime Type
text/plain
Expires
Wed, Mar 19, 11:09 PM (7 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17212191
Default Alt Text
D49393.diff (1 KB)

Event Timeline