From owner-p4-projects@FreeBSD.ORG Mon Feb 16 14:53:42 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DF58216A4D4; Mon, 16 Feb 2004 14:53:41 -0800 (PST) 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 B725716A4CE for ; Mon, 16 Feb 2004 14:53:41 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9E2C943D1D for ; Mon, 16 Feb 2004 14:53:41 -0800 (PST) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i1GMrfGe071475 for ; Mon, 16 Feb 2004 14:53:41 -0800 (PST) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i1GMrfdH071472 for perforce@freebsd.org; Mon, 16 Feb 2004 14:53:41 -0800 (PST) (envelope-from sam@freebsd.org) Date: Mon, 16 Feb 2004 14:53:41 -0800 (PST) Message-Id: <200402162253.i1GMrfdH071472@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 47062 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: Mon, 16 Feb 2004 22:53:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=47062 Change 47062 by sam@sam_ebb on 2004/02/16 14:52:40 o use privacy flag bit instead of "wep is on" bit o do port authorization/unauthorization when not using 802.1x Affected files ... .. //depot/projects/netperf+sockets/sys/net80211/ieee80211_output.c#17 edit Differences ... ==== //depot/projects/netperf+sockets/sys/net80211/ieee80211_output.c#17 (text+ko) ==== @@ -426,7 +426,7 @@ capinfo = IEEE80211_CAPINFO_IBSS; else capinfo = IEEE80211_CAPINFO_ESS; - if (ic->ic_flags & IEEE80211_F_WEPON) + if (ic->ic_flags & IEEE80211_F_PRIVACY) capinfo |= IEEE80211_CAPINFO_PRIVACY; if ((ic->ic_flags & IEEE80211_F_SHPREAMBLE) && IEEE80211_IS_CHAN_2GHZ(ni->ni_chan)) @@ -511,6 +511,14 @@ m->m_flags |= M_LINK0; /* WEP-encrypt, please */ } } + /* + * When 802.1x is not in use mark the port + * authorized at this point so traffic can flow. + */ + if (ic->ic_opmode == IEEE80211_M_HOSTAP && + status == IEEE80211_STATUS_SUCCESS && + ni->ni_authmode != IEEE80211_AUTH_8021X) + ieee80211_node_authorize(ic, ni); if (ic->ic_opmode == IEEE80211_M_STA) timer = IEEE80211_TRANS_WAIT; break; @@ -523,6 +531,7 @@ if (m == NULL) senderr(ENOMEM, is_tx_nobuf); *(u_int16_t *)frm = htole16(arg); /* reason */ + ieee80211_node_unauthorize(ic, ni); /* port closed */ break; case IEEE80211_FC0_SUBTYPE_ASSOC_REQ: @@ -551,7 +560,7 @@ capinfo |= IEEE80211_CAPINFO_IBSS; else /* IEEE80211_M_STA */ capinfo |= IEEE80211_CAPINFO_ESS; - if (ic->ic_flags & IEEE80211_F_WEPON) + if (ic->ic_flags & IEEE80211_F_PRIVACY) capinfo |= IEEE80211_CAPINFO_PRIVACY; /* * NB: Some 11a AP's reject the request when @@ -601,7 +610,7 @@ senderr(ENOMEM, is_tx_nobuf); capinfo = IEEE80211_CAPINFO_ESS; - if (ic->ic_flags & IEEE80211_F_WEPON) + if (ic->ic_flags & IEEE80211_F_PRIVACY) capinfo |= IEEE80211_CAPINFO_PRIVACY; if ((ic->ic_flags & IEEE80211_F_SHPREAMBLE) && IEEE80211_IS_CHAN_2GHZ(ni->ni_chan)) @@ -720,7 +729,7 @@ capinfo = IEEE80211_CAPINFO_IBSS; else capinfo = IEEE80211_CAPINFO_ESS; - if (ic->ic_flags & IEEE80211_F_WEPON) + if (ic->ic_flags & IEEE80211_F_PRIVACY) capinfo |= IEEE80211_CAPINFO_PRIVACY; if ((ic->ic_flags & IEEE80211_F_SHPREAMBLE) && IEEE80211_IS_CHAN_2GHZ(ni->ni_chan)) @@ -784,7 +793,7 @@ capinfo = IEEE80211_CAPINFO_IBSS; else capinfo = IEEE80211_CAPINFO_ESS; - if (ic->ic_flags & IEEE80211_F_WEPON) + if (ic->ic_flags & IEEE80211_F_PRIVACY) capinfo |= IEEE80211_CAPINFO_PRIVACY; if ((ic->ic_flags & IEEE80211_F_SHPREAMBLE) && IEEE80211_IS_CHAN_2GHZ(ni->ni_chan))