mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 00:38:24 -05:00
Indicate wifi_generation in wpa_supplicant STATUS output
This adds a wifi_generation=4/5/6 line to the STATUS output if the driver reports (Re)Association Request frame and (Re)Association Response frame information elements in the association or connection event. Only the generations 4 (HT = 802.11n), 5 (VHT = 802.11ac), and 6 (HE = 802.11ax) are reported. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
ccaf774767
commit
3f8ceff54c
@ -2118,6 +2118,18 @@ static int wpa_supplicant_ctrl_iface_status(struct wpa_supplicant *wpa_s,
|
|||||||
pos += ret;
|
pos += ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (wpa_s->connection_set &&
|
||||||
|
(wpa_s->connection_ht || wpa_s->connection_vht ||
|
||||||
|
wpa_s->connection_he)) {
|
||||||
|
ret = os_snprintf(pos, end - pos,
|
||||||
|
"wifi_generation=%u\n",
|
||||||
|
wpa_s->connection_he ? 6 :
|
||||||
|
(wpa_s->connection_vht ? 5 : 4));
|
||||||
|
if (os_snprintf_error(end - pos, ret))
|
||||||
|
return pos - buf;
|
||||||
|
pos += ret;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_AP
|
#ifdef CONFIG_AP
|
||||||
if (wpa_s->ap_iface) {
|
if (wpa_s->ap_iface) {
|
||||||
pos += ap_ctrl_iface_wpa_get_status(wpa_s, pos,
|
pos += ap_ctrl_iface_wpa_get_status(wpa_s, pos,
|
||||||
|
@ -2409,6 +2409,26 @@ static int wpa_supplicant_event_associnfo(struct wpa_supplicant *wpa_s,
|
|||||||
wpa_dbg(wpa_s, MSG_DEBUG, "freq=%u MHz",
|
wpa_dbg(wpa_s, MSG_DEBUG, "freq=%u MHz",
|
||||||
data->assoc_info.freq);
|
data->assoc_info.freq);
|
||||||
|
|
||||||
|
wpa_s->connection_set = 0;
|
||||||
|
if (data->assoc_info.req_ies && data->assoc_info.resp_ies) {
|
||||||
|
struct ieee802_11_elems req_elems, resp_elems;
|
||||||
|
|
||||||
|
if (ieee802_11_parse_elems(data->assoc_info.req_ies,
|
||||||
|
data->assoc_info.req_ies_len,
|
||||||
|
&req_elems, 0) != ParseFailed &&
|
||||||
|
ieee802_11_parse_elems(data->assoc_info.resp_ies,
|
||||||
|
data->assoc_info.resp_ies_len,
|
||||||
|
&resp_elems, 0) != ParseFailed) {
|
||||||
|
wpa_s->connection_set = 1;
|
||||||
|
wpa_s->connection_ht = req_elems.ht_capabilities &&
|
||||||
|
resp_elems.ht_capabilities;
|
||||||
|
wpa_s->connection_vht = req_elems.vht_capabilities &&
|
||||||
|
resp_elems.vht_capabilities;
|
||||||
|
wpa_s->connection_he = req_elems.he_capabilities &&
|
||||||
|
resp_elems.he_capabilities;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
p = data->assoc_info.req_ies;
|
p = data->assoc_info.req_ies;
|
||||||
l = data->assoc_info.req_ies_len;
|
l = data->assoc_info.req_ies_len;
|
||||||
|
|
||||||
|
@ -751,6 +751,10 @@ struct wpa_supplicant {
|
|||||||
unsigned int wnmsleep_used:1;
|
unsigned int wnmsleep_used:1;
|
||||||
unsigned int owe_transition_select:1;
|
unsigned int owe_transition_select:1;
|
||||||
unsigned int owe_transition_search:1;
|
unsigned int owe_transition_search:1;
|
||||||
|
unsigned int connection_set:1;
|
||||||
|
unsigned int connection_ht:1;
|
||||||
|
unsigned int connection_vht:1;
|
||||||
|
unsigned int connection_he:1;
|
||||||
|
|
||||||
struct os_reltime last_mac_addr_change;
|
struct os_reltime last_mac_addr_change;
|
||||||
int last_mac_addr_style;
|
int last_mac_addr_style;
|
||||||
|
Loading…
Reference in New Issue
Block a user