PERFORCE change 63895 for review
Sam Leffler
sam at FreeBSD.org
Thu Oct 28 14:49:54 PDT 2004
http://perforce.freebsd.org/chv.cgi?CH=63895
Change 63895 by sam at sam_ebb on 2004/10/28 21:49:04
move complaint about lacking a tx key so we can suppress it
in a case where it's not an error
Affected files ...
.. //depot/projects/wifi/sys/net80211/ieee80211_output.c#4 edit
Differences ...
==== //depot/projects/wifi/sys/net80211/ieee80211_output.c#4 (text+ko) ====
@@ -230,12 +230,8 @@
#define KEY_UNDEFINED(k) ((k).wk_cipher == &ieee80211_cipher_none)
if (IEEE80211_IS_MULTICAST(mac) || KEY_UNDEFINED(ni->ni_ucastkey)) {
if (ic->ic_def_txkey == IEEE80211_KEYIX_NONE ||
- KEY_UNDEFINED(ic->ic_nw_keys[ic->ic_def_txkey])) {
- IEEE80211_DPRINTF(ic, IEEE80211_MSG_CRYPTO,
- "%s: No default transmit key\n", __func__);
- /* XXX statistic */
+ KEY_UNDEFINED(ic->ic_nw_keys[ic->ic_def_txkey]))
return NULL;
- }
return &ic->ic_nw_keys[ic->ic_def_txkey];
} else {
return &ni->ni_ucastkey;
@@ -307,9 +303,14 @@
* buffer may not be expanded as needed by the cipher
* routines, but they will/should discard it.
*/
- if (ic->ic_flags & IEEE80211_F_PRIVACY)
+ if (ic->ic_flags & IEEE80211_F_PRIVACY) {
key = ieee80211_crypto_getkey(ic, eh.ether_dhost, ni);
- else
+ if (key == NULL && eh.ether_type != htons(ETHERTYPE_PAE)) {
+ IEEE80211_DPRINTF(ic, IEEE80211_MSG_CRYPTO,
+ "%s: No default transmit key\n", __func__);
+ /* XXX statistic */
+ }
+ } else
key = NULL;
/* XXX 4-address format */
if (ni->ni_flags & IEEE80211_NODE_QOS)
More information about the p4-projects
mailing list