mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 00:38:24 -05:00
OCE: Use RSSI of actual BSS which rejected association
If an AP rejects association due to low RSSI, then RSSI of the BSS from which association reject is received shall be used for calculating RSSI threshold at which STA can try connecting back to that BSS later. In case of SME offload, the current_bss might not have been set before receiving association completion, so fetch the BSS entry based on the BSSID provided in the driver event. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
bc4d7dfc5a
commit
a8391db7cf
@ -4059,9 +4059,18 @@ static void wpas_event_assoc_reject(struct wpa_supplicant *wpa_s,
|
||||
union wpa_event_data *data)
|
||||
{
|
||||
const u8 *bssid = data->assoc_reject.bssid;
|
||||
#ifdef CONFIG_MBO
|
||||
struct wpa_bss *reject_bss;
|
||||
#endif /* CONFIG_MBO */
|
||||
|
||||
if (!bssid || is_zero_ether_addr(bssid))
|
||||
bssid = wpa_s->pending_bssid;
|
||||
#ifdef CONFIG_MBO
|
||||
if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME)
|
||||
reject_bss = wpa_s->current_bss;
|
||||
else
|
||||
reject_bss = wpa_bss_get_bssid(wpa_s, bssid);
|
||||
#endif /* CONFIG_MBO */
|
||||
|
||||
if (data->assoc_reject.bssid)
|
||||
wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_ASSOC_REJECT
|
||||
@ -4112,8 +4121,7 @@ static void wpas_event_assoc_reject(struct wpa_supplicant *wpa_s,
|
||||
#ifdef CONFIG_MBO
|
||||
if (data->assoc_reject.status_code ==
|
||||
WLAN_STATUS_DENIED_POOR_CHANNEL_CONDITIONS &&
|
||||
wpa_s->current_bss && data->assoc_reject.bssid &&
|
||||
data->assoc_reject.resp_ies) {
|
||||
reject_bss && data->assoc_reject.resp_ies) {
|
||||
const u8 *rssi_rej;
|
||||
|
||||
rssi_rej = mbo_get_attr_from_ies(
|
||||
@ -4124,13 +4132,12 @@ static void wpas_event_assoc_reject(struct wpa_supplicant *wpa_s,
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"OCE: RSSI-based association rejection from "
|
||||
MACSTR " (Delta RSSI: %u, Retry Delay: %u)",
|
||||
MAC2STR(data->assoc_reject.bssid),
|
||||
MAC2STR(reject_bss->bssid),
|
||||
rssi_rej[2], rssi_rej[3]);
|
||||
wpa_bss_tmp_disallow(wpa_s,
|
||||
data->assoc_reject.bssid,
|
||||
reject_bss->bssid,
|
||||
rssi_rej[3],
|
||||
rssi_rej[2] +
|
||||
wpa_s->current_bss->level);
|
||||
rssi_rej[2] + reject_bss->level);
|
||||
}
|
||||
}
|
||||
#endif /* CONFIG_MBO */
|
||||
|
Loading…
Reference in New Issue
Block a user