diff options
author | Jouni Malinen <jouni.malinen@atheros.com> | 2009-06-11 11:19:45 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-06-15 15:05:51 -0400 |
commit | 68f2d02669f7102be80aae47155f45e18950d223 (patch) | |
tree | d62bac9654a823b14bebabf7f837e2f9acba2260 /net/mac80211/mlme.c | |
parent | e1f8a19e6fc4f6d4267f6d3fe465553c3688f28e (diff) |
mac80211: Do not try to associate with an empty SSID
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>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index d779c57a8220..e5de9cea0034 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -2445,6 +2445,14 @@ void ieee80211_sta_req_auth(struct ieee80211_sub_if_data *sdata) | |||
2445 | ieee80211_set_disassoc(sdata, true, true, | 2445 | ieee80211_set_disassoc(sdata, true, true, |
2446 | WLAN_REASON_DEAUTH_LEAVING); | 2446 | WLAN_REASON_DEAUTH_LEAVING); |
2447 | 2447 | ||
2448 | if (ifmgd->ssid_len == 0) { | ||
2449 | /* | ||
2450 | * Only allow association to be started if a valid SSID | ||
2451 | * is configured. | ||
2452 | */ | ||
2453 | return; | ||
2454 | } | ||
2455 | |||
2448 | if (!(ifmgd->flags & IEEE80211_STA_EXT_SME) || | 2456 | if (!(ifmgd->flags & IEEE80211_STA_EXT_SME) || |
2449 | ifmgd->state != IEEE80211_STA_MLME_ASSOCIATE) | 2457 | ifmgd->state != IEEE80211_STA_MLME_ASSOCIATE) |
2450 | set_bit(IEEE80211_STA_REQ_AUTH, &ifmgd->request); | 2458 | set_bit(IEEE80211_STA_REQ_AUTH, &ifmgd->request); |