mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 09:59:32 +00:00
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>
This commit is contained in:
parent
c53f7e150e
commit
dac211ec10
1 changed files with 2 additions and 2 deletions
|
@ -1791,7 +1791,8 @@ ieee80211_rx_mgmt_auth(struct ieee80211_sub_if_data *sdata,
|
||||||
if (status_code != WLAN_STATUS_SUCCESS) {
|
if (status_code != WLAN_STATUS_SUCCESS) {
|
||||||
printk(KERN_DEBUG "%s: %pM denied authentication (status %d)\n",
|
printk(KERN_DEBUG "%s: %pM denied authentication (status %d)\n",
|
||||||
sdata->name, mgmt->sa, status_code);
|
sdata->name, mgmt->sa, status_code);
|
||||||
goto out;
|
ieee80211_destroy_auth_data(sdata, false);
|
||||||
|
return RX_MGMT_CFG80211_RX_AUTH;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (ifmgd->auth_data->algorithm) {
|
switch (ifmgd->auth_data->algorithm) {
|
||||||
|
@ -1813,7 +1814,6 @@ ieee80211_rx_mgmt_auth(struct ieee80211_sub_if_data *sdata,
|
||||||
}
|
}
|
||||||
|
|
||||||
printk(KERN_DEBUG "%s: authenticated\n", sdata->name);
|
printk(KERN_DEBUG "%s: authenticated\n", sdata->name);
|
||||||
out:
|
|
||||||
ifmgd->auth_data->done = true;
|
ifmgd->auth_data->done = true;
|
||||||
ifmgd->auth_data->timeout = jiffies + IEEE80211_AUTH_WAIT_ASSOC;
|
ifmgd->auth_data->timeout = jiffies + IEEE80211_AUTH_WAIT_ASSOC;
|
||||||
run_again(ifmgd, ifmgd->auth_data->timeout);
|
run_again(ifmgd, ifmgd->auth_data->timeout);
|
||||||
|
|
Loading…
Reference in a new issue