Date: Mon, 16 Feb 2004 14:53:41 -0800 (PST) From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 47062 for review Message-ID: <200402162253.i1GMrfdH071472@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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))
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200402162253.i1GMrfdH071472>