mark stations authorized during recv processing instead of doing it

as a side effect of sending an auth success frame; sending mgmt
frames should not have side effects
This commit is contained in:
Sam Leffler 2005-06-10 05:04:42 +00:00
parent 578994bbd7
commit da17aba102
2 changed files with 7 additions and 8 deletions

View file

@ -891,6 +891,12 @@ ieee80211_auth_open(struct ieee80211com *ic, struct ieee80211_frame *wh,
IEEE80211_DPRINTF(ic, IEEE80211_MSG_DEBUG | IEEE80211_MSG_AUTH,
"[%s] station authenticated (open)\n",
ether_sprintf(ni->ni_macaddr));
/*
* When 802.1x is not in use mark the port
* authorized at this point so traffic can flow.
*/
if (ni->ni_authmode != IEEE80211_AUTH_8021X)
ieee80211_node_authorize(ic, ni);
break;
case IEEE80211_M_STA:
@ -1106,6 +1112,7 @@ ieee80211_auth_shared(struct ieee80211com *ic, struct ieee80211_frame *wh,
IEEE80211_MSG_DEBUG | IEEE80211_MSG_AUTH,
"[%s] station authenticated (shared key)\n",
ether_sprintf(ni->ni_macaddr));
ieee80211_node_authorize(ic, ni);
break;
default:
IEEE80211_DISCARD_MAC(ic, IEEE80211_MSG_AUTH,

View file

@ -1111,14 +1111,6 @@ ieee80211_send_mgmt(struct ieee80211com *ic, struct ieee80211_node *ni,
else
IEEE80211_NODE_STAT(ni, tx_auth_fail);
/*
* 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;