PERFORCE change 47062 for review
Sam Leffler
sam at FreeBSD.org
Mon Feb 16 14:53:42 PST 2004
http://perforce.freebsd.org/chv.cgi?CH=47062
Change 47062 by sam at 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))
More information about the p4-projects
mailing list