aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/mlme.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index d779c57a822..e5de9cea003 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)
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);