Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 452a6d22 authored by Will Hawkins's avatar Will Hawkins Committed by Johannes Berg
Browse files

mac80211: send auth in IBSS only if userspace isn't handling it



Check the auth frame registration count before sending
"open system" authentication messages when a new station
registers on a particular IBSS network. This stops us
from sending out multiple authentication messages with
different authentication algorithms.

Signed-off-by: default avatarWill Hawkins <hawkinsw@opentechinstitute.org>
[reword commit message a bit]
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 6abe0563
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -279,7 +279,7 @@ static struct sta_info *ieee80211_ibss_finish_sta(struct sta_info *sta,
	/* If it fails, maybe we raced another insertion? */
	/* If it fails, maybe we raced another insertion? */
	if (sta_info_insert_rcu(sta))
	if (sta_info_insert_rcu(sta))
		return sta_info_get(sdata, addr);
		return sta_info_get(sdata, addr);
	if (auth) {
	if (auth && !sdata->u.ibss.auth_frame_registrations) {
		ibss_vdbg("TX Auth SA=%pM DA=%pM BSSID=%pM (auth_transaction=1)\n",
		ibss_vdbg("TX Auth SA=%pM DA=%pM BSSID=%pM (auth_transaction=1)\n",
			  sdata->vif.addr, sdata->u.ibss.bssid, addr);
			  sdata->vif.addr, sdata->u.ibss.bssid, addr);
		ieee80211_send_auth(sdata, 1, WLAN_AUTH_OPEN, NULL, 0,
		ieee80211_send_auth(sdata, 1, WLAN_AUTH_OPEN, NULL, 0,