Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F112543735
D49393.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D49393.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 20, 3:25 PM (20 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17212191
Default Alt Text
D49393.diff (1 KB)
Attached To
Mode
D49393: net80211: fail setting a key if the cipher isn't HW/SW supported
Attached
Detach File
Event Timeline
Log In to Comment