mirror of
https://github.com/opnsense/src.git
synced 2026-03-02 21:31:02 -05:00
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:
parent
578994bbd7
commit
da17aba102
2 changed files with 7 additions and 8 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue