mac80211: send auth in IBSS only if userspace isn't handling it
authorWill Hawkins <hawkinsw@opentechinstitute.org>
Tue, 19 Jun 2012 21:59:13 +0000 (17:59 -0400)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 20 Jun 2012 18:03:42 +0000 (20:03 +0200)
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: Will Hawkins <hawkinsw@opentechinstitute.org>
[reword commit message a bit]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/ibss.c

index 725cb4be229dec4359830a4db5152ace6c56e2e7..ff46ff4249419d3dd156c00f3c664ba4deac235b 100644 (file)
@@ -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 (sta_info_insert_rcu(sta))
                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",
                          sdata->vif.addr, sdata->u.ibss.bssid, addr);
                ieee80211_send_auth(sdata, 1, WLAN_AUTH_OPEN, NULL, 0,