From owner-p4-projects@FreeBSD.ORG Thu Oct 28 21:49:54 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0928816A4D0; Thu, 28 Oct 2004 21:49:54 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D26C516A4CE for ; Thu, 28 Oct 2004 21:49:53 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C433043D1D for ; Thu, 28 Oct 2004 21:49:53 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i9SLnrNT012527 for ; Thu, 28 Oct 2004 21:49:53 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i9SLnr9b012524 for perforce@freebsd.org; Thu, 28 Oct 2004 21:49:53 GMT (envelope-from sam@freebsd.org) Date: Thu, 28 Oct 2004 21:49:53 GMT Message-Id: <200410282149.i9SLnr9b012524@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 63895 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Oct 2004 21:49:54 -0000 http://perforce.freebsd.org/chv.cgi?CH=63895 Change 63895 by sam@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)