diff options
author | Eliad Peller <eliad@wizery.com> | 2012-05-13 11:07:04 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-06-05 15:21:47 -0400 |
commit | dac211ec10d268b9d09000093a9fa2ac1773894f (patch) | |
tree | cd20198268d17aeb5a552bd55679c36bb682b0a0 /net/mac80211/mlme.c | |
parent | c53f7e150e178b62b9904428ccbe3ae6f3553fdd (diff) |
mac80211: fail authentication when AP denied authentication
ieee80211_rx_mgmt_auth() doesn't handle denied authentication
properly - it authenticates the station and waits for association
(for 5 seconds) instead of failing the authentication.
Fix it by destroying auth_data and bailing out instead.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Cc: stable@vger.kernel.org #3.4
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 04c306308987..a2f18b7e6858 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -1791,7 +1791,8 @@ ieee80211_rx_mgmt_auth(struct ieee80211_sub_if_data *sdata, | |||
1791 | if (status_code != WLAN_STATUS_SUCCESS) { | 1791 | if (status_code != WLAN_STATUS_SUCCESS) { |
1792 | printk(KERN_DEBUG "%s: %pM denied authentication (status %d)\n", | 1792 | printk(KERN_DEBUG "%s: %pM denied authentication (status %d)\n", |
1793 | sdata->name, mgmt->sa, status_code); | 1793 | sdata->name, mgmt->sa, status_code); |
1794 | goto out; | 1794 | ieee80211_destroy_auth_data(sdata, false); |
1795 | return RX_MGMT_CFG80211_RX_AUTH; | ||
1795 | } | 1796 | } |
1796 | 1797 | ||
1797 | switch (ifmgd->auth_data->algorithm) { | 1798 | switch (ifmgd->auth_data->algorithm) { |
@@ -1813,7 +1814,6 @@ ieee80211_rx_mgmt_auth(struct ieee80211_sub_if_data *sdata, | |||
1813 | } | 1814 | } |
1814 | 1815 | ||
1815 | printk(KERN_DEBUG "%s: authenticated\n", sdata->name); | 1816 | printk(KERN_DEBUG "%s: authenticated\n", sdata->name); |
1816 | out: | ||
1817 | ifmgd->auth_data->done = true; | 1817 | ifmgd->auth_data->done = true; |
1818 | ifmgd->auth_data->timeout = jiffies + IEEE80211_AUTH_WAIT_ASSOC; | 1818 | ifmgd->auth_data->timeout = jiffies + IEEE80211_AUTH_WAIT_ASSOC; |
1819 | run_again(ifmgd, ifmgd->auth_data->timeout); | 1819 | run_again(ifmgd, ifmgd->auth_data->timeout); |