mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-31 01:04:03 -05:00
nl80211: Update the assoc_freq during connect
drv->assoc_freq was not updated during the connect command (neither during the command's invocation nor after getting the event) unlike with auth/assoc case where assoc_freq is updated. This resulted in nl80211_get_link_noise() (and any other function for that matter) using the improper drv->assoc_freq value with drivers that use the connect API. Fix this by updating drv->assoc_freq on connect command and when fetching the frequency from the driver. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
83e7bb0e5d
commit
30158a0d80
@ -1279,7 +1279,9 @@ static unsigned int nl80211_get_assoc_freq(struct wpa_driver_nl80211_data *drv)
|
|||||||
wpa_printf(MSG_DEBUG, "nl80211: Operating frequency for the "
|
wpa_printf(MSG_DEBUG, "nl80211: Operating frequency for the "
|
||||||
"associated BSS from scan results: %u MHz",
|
"associated BSS from scan results: %u MHz",
|
||||||
arg.assoc_freq);
|
arg.assoc_freq);
|
||||||
return arg.assoc_freq ? arg.assoc_freq : drv->assoc_freq;
|
if (arg.assoc_freq)
|
||||||
|
drv->assoc_freq = arg.assoc_freq;
|
||||||
|
return drv->assoc_freq;
|
||||||
}
|
}
|
||||||
wpa_printf(MSG_DEBUG, "nl80211: Scan result fetch failed: ret=%d "
|
wpa_printf(MSG_DEBUG, "nl80211: Scan result fetch failed: ret=%d "
|
||||||
"(%s)", ret, strerror(-ret));
|
"(%s)", ret, strerror(-ret));
|
||||||
@ -7635,7 +7637,9 @@ static int wpa_driver_nl80211_try_connect(
|
|||||||
if (params->freq) {
|
if (params->freq) {
|
||||||
wpa_printf(MSG_DEBUG, " * freq=%d", params->freq);
|
wpa_printf(MSG_DEBUG, " * freq=%d", params->freq);
|
||||||
NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_FREQ, params->freq);
|
NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_FREQ, params->freq);
|
||||||
}
|
drv->assoc_freq = params->freq;
|
||||||
|
} else
|
||||||
|
drv->assoc_freq = 0;
|
||||||
if (params->bg_scan_period >= 0) {
|
if (params->bg_scan_period >= 0) {
|
||||||
wpa_printf(MSG_DEBUG, " * bg scan period=%d",
|
wpa_printf(MSG_DEBUG, " * bg scan period=%d",
|
||||||
params->bg_scan_period);
|
params->bg_scan_period);
|
||||||
|
Loading…
Reference in New Issue
Block a user