Skip to content

Commit

Permalink
mac80211: fail authentication when AP denied authentication
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Johannes Berg <[email protected]>
Cc: [email protected] #3.4
Signed-off-by: John W. Linville <[email protected]>
  • Loading branch information
elp authored and linvjw committed Jun 5, 2012
1 parent c53f7e1 commit dac211e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -1791,7 +1791,8 @@ ieee80211_rx_mgmt_auth(struct ieee80211_sub_if_data *sdata,
if (status_code != WLAN_STATUS_SUCCESS) {
printk(KERN_DEBUG "%s: %pM denied authentication (status %d)\n",
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) {
Expand All @@ -1813,7 +1814,6 @@ ieee80211_rx_mgmt_auth(struct ieee80211_sub_if_data *sdata,
}

printk(KERN_DEBUG "%s: authenticated\n", sdata->name);
out:
ifmgd->auth_data->done = true;
ifmgd->auth_data->timeout = jiffies + IEEE80211_AUTH_WAIT_ASSOC;
run_again(ifmgd, ifmgd->auth_data->timeout);
Expand Down

0 comments on commit dac211e

Please sign in to comment.