Date: Tue, 14 Dec 2004 03:14:12 GMT From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 67021 for review Message-ID: <200412140314.iBE3ECuG001737@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=67021 Change 67021 by sam@sam_ebb on 2004/12/14 03:13:35 o fillin QoS header prior to enmic so it's available for TKIP o cleanup debug msg and add statistic for no default xmit key Affected files ... .. //depot/projects/wifi/sys/net80211/ieee80211_output.c#25 edit Differences ... ==== //depot/projects/wifi/sys/net80211/ieee80211_output.c#25 (text+ko) ==== @@ -452,9 +452,10 @@ key = ieee80211_crypto_getkey(ic, eh.ether_dhost, ni); if (key == NULL && eh.ether_type != htons(ETHERTYPE_PAE)) { IEEE80211_DPRINTF(ic, IEEE80211_MSG_CRYPTO, - "[%s] no default transmit key\n", - ether_sprintf(ni->ni_macaddr)); - /* XXX statistic */ + "[%s] no default transmit key (%s) deftxkey %u\n", + ether_sprintf(ni->ni_macaddr), __func__, + ic->ic_def_txkey); + ic->ic_stats.is_tx_nodefkey++; } } else key = NULL; @@ -513,25 +514,6 @@ case IEEE80211_M_MONITOR: goto bad; } - if (eh.ether_type != htons(ETHERTYPE_PAE) || - (key != NULL && (ic->ic_flags & IEEE80211_F_WPA))) { - /* - * IEEE 802.1X: send EAPOL frames always in the clear. - * WPA/WPA2: encrypt EAPOL keys when pairwise keys are set. - */ - if (key != NULL) { - wh->i_fc[1] |= IEEE80211_FC1_WEP; - /* XXX do fragmentation */ - if (!ieee80211_crypto_enmic(ic, key, m)) { - IEEE80211_DPRINTF(ic, IEEE80211_MSG_OUTPUT, - "[%s] enmic failed, discard frame\n", - ether_sprintf(eh.ether_dhost)); - /* XXX statistic */ - goto bad; - } - } - } - if (ni->ni_flags & IEEE80211_NODE_QOS) { struct ieee80211_qosframe *qwh = (struct ieee80211_qosframe *) wh; @@ -554,6 +536,24 @@ htole16(ni->ni_txseqs[0] << IEEE80211_SEQ_SEQ_SHIFT); ni->ni_txseqs[0]++; } + if (eh.ether_type != htons(ETHERTYPE_PAE) || + (key != NULL && (ic->ic_flags & IEEE80211_F_WPA))) { + /* + * IEEE 802.1X: send EAPOL frames always in the clear. + * WPA/WPA2: encrypt EAPOL keys when pairwise keys are set. + */ + if (key != NULL) { + wh->i_fc[1] |= IEEE80211_FC1_WEP; + /* XXX do fragmentation */ + if (!ieee80211_crypto_enmic(ic, key, m)) { + IEEE80211_DPRINTF(ic, IEEE80211_MSG_OUTPUT, + "[%s] enmic failed, discard frame\n", + ether_sprintf(eh.ether_dhost)); + /* XXX statistic */ + goto bad; + } + } + } IEEE80211_NODE_STAT(ni, tx_data); IEEE80211_NODE_STAT_ADD(ni, tx_bytes, datalen);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200412140314.iBE3ECuG001737>