mac80211: Do not try to associate with an empty SSID
authorJouni Malinen <jouni.malinen@atheros.com>
Thu, 11 Jun 2009 15:19:45 +0000 (18:19 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 15 Jun 2009 19:05:51 +0000 (15:05 -0400)
It looks like some programs (e.g., NM) are setting an empty SSID with
SIOCSIWESSID in some cases. This seems to trigger mac80211 to try to
associate with an invalid configuration (wildcard SSID) which will
result in failing associations (or odd issues, potentially including
kernel panic with some drivers) if the AP were to actually accept this
anyway).

Only start association process if the SSID is actually set. This
speeds up connection with NM in number of cases and avoids sending out
broken association request frames.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/mlme.c

index d779c57a82203b23194772565d4e6ba2ed172406..e5de9cea0034386fedcb4343440707f433feca6a 100644 (file)
@@ -2445,6 +2445,14 @@ void ieee80211_sta_req_auth(struct ieee80211_sub_if_data *sdata)
                        ieee80211_set_disassoc(sdata, true, true,
                                               WLAN_REASON_DEAUTH_LEAVING);
 
+               if (ifmgd->ssid_len == 0) {
+                       /*
+                        * Only allow association to be started if a valid SSID
+                        * is configured.
+                        */
+                       return;
+               }
+
                if (!(ifmgd->flags & IEEE80211_STA_EXT_SME) ||
                    ifmgd->state != IEEE80211_STA_MLME_ASSOCIATE)
                        set_bit(IEEE80211_STA_REQ_AUTH, &ifmgd->request);
This page took 0.033496 seconds and 5 git commands to generate.