mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
Add an option for driver wrappers to report operational frequency
This commit is contained in:
parent
cd7d80f373
commit
4832ecd754
@ -1797,6 +1797,11 @@ union wpa_event_data {
|
||||
/**
|
||||
* beacon_ies_len - Length of beacon_ies */
|
||||
size_t beacon_ies_len;
|
||||
|
||||
/**
|
||||
* freq - Frequency of the operational channel in MHz
|
||||
*/
|
||||
unsigned int freq;
|
||||
} assoc_info;
|
||||
|
||||
/**
|
||||
|
@ -91,6 +91,7 @@ struct wpa_driver_nl80211_data {
|
||||
size_t ssid_len;
|
||||
int nlmode;
|
||||
int ap_scan_as_station;
|
||||
unsigned int assoc_freq;
|
||||
|
||||
int monitor_sock;
|
||||
int monitor_ifidx;
|
||||
@ -536,6 +537,8 @@ static void mlme_event_assoc(struct wpa_driver_nl80211_data *drv,
|
||||
len - 24 - sizeof(mgmt->u.assoc_resp);
|
||||
}
|
||||
|
||||
event.assoc_info.freq = drv->assoc_freq;
|
||||
|
||||
wpa_supplicant_event(drv->ctx, EVENT_ASSOC, &event);
|
||||
}
|
||||
|
||||
@ -3442,7 +3445,9 @@ static int wpa_driver_nl80211_associate(
|
||||
if (params->freq) {
|
||||
wpa_printf(MSG_DEBUG, " * freq=%d", params->freq);
|
||||
NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_FREQ, params->freq);
|
||||
}
|
||||
drv->assoc_freq = params->freq;
|
||||
} else
|
||||
drv->assoc_freq = 0;
|
||||
if (params->ssid) {
|
||||
wpa_hexdump_ascii(MSG_DEBUG, " * SSID",
|
||||
params->ssid, params->ssid_len);
|
||||
|
@ -888,6 +888,8 @@ static void wpa_supplicant_event_associnfo(struct wpa_supplicant *wpa_s,
|
||||
wpa_hexdump(MSG_DEBUG, "beacon_ies",
|
||||
data->assoc_info.beacon_ies,
|
||||
data->assoc_info.beacon_ies_len);
|
||||
if (data->assoc_info.freq)
|
||||
wpa_printf(MSG_DEBUG, "freq=%u MHz", data->assoc_info.freq);
|
||||
|
||||
p = data->assoc_info.req_ies;
|
||||
l = data->assoc_info.req_ies_len;
|
||||
@ -975,6 +977,8 @@ static void wpa_supplicant_event_associnfo(struct wpa_supplicant *wpa_s,
|
||||
wpa_sm_set_ap_rsn_ie(wpa_s->wpa, NULL, 0);
|
||||
if (wpa_found || rsn_found)
|
||||
wpa_s->ap_ies_from_associnfo = 1;
|
||||
|
||||
wpa_s->assoc_freq = data->assoc_info.freq;
|
||||
}
|
||||
|
||||
|
||||
|
@ -326,6 +326,7 @@ struct wpa_supplicant {
|
||||
* before this has been cleared */
|
||||
struct wpa_ssid *current_ssid;
|
||||
int ap_ies_from_associnfo;
|
||||
unsigned int assoc_freq;
|
||||
|
||||
/* Selected configuration (based on Beacon/ProbeResp WPA IE) */
|
||||
int pairwise_cipher;
|
||||
|
Loading…
Reference in New Issue
Block a user