mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-19 11:24:05 -05:00
nl80211: More detailed PROBE_CLIENT debug print
Include the MAC address of the peer, knowledge of whether the poll was ACKed, and cookie into the debug message to make this more useful. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
9c4554a9b7
commit
28f19a3ae5
@ -1438,16 +1438,23 @@ static void nl80211_client_probe_event(struct wpa_driver_nl80211_data *drv,
|
|||||||
struct nlattr **tb)
|
struct nlattr **tb)
|
||||||
{
|
{
|
||||||
union wpa_event_data data;
|
union wpa_event_data data;
|
||||||
|
const u8 *addr;
|
||||||
|
u64 cookie = 0;
|
||||||
|
|
||||||
wpa_printf(MSG_DEBUG, "nl80211: Probe client event");
|
addr = nla_data(tb[NL80211_ATTR_MAC]);
|
||||||
|
if (!addr)
|
||||||
if (!tb[NL80211_ATTR_MAC] || !tb[NL80211_ATTR_ACK])
|
return;
|
||||||
|
if (tb[NL80211_ATTR_COOKIE])
|
||||||
|
cookie = nla_get_u64(tb[NL80211_ATTR_COOKIE]);
|
||||||
|
wpa_printf(MSG_DEBUG, "nl80211: Probe client event (addr=" MACSTR
|
||||||
|
" ack=%d cookie=%llu)", MAC2STR(addr),
|
||||||
|
tb[NL80211_ATTR_ACK] != NULL,
|
||||||
|
(long long unsigned int) cookie);
|
||||||
|
if (!tb[NL80211_ATTR_ACK])
|
||||||
return;
|
return;
|
||||||
|
|
||||||
os_memset(&data, 0, sizeof(data));
|
os_memset(&data, 0, sizeof(data));
|
||||||
os_memcpy(data.client_poll.addr,
|
os_memcpy(data.client_poll.addr, addr, ETH_ALEN);
|
||||||
nla_data(tb[NL80211_ATTR_MAC]), ETH_ALEN);
|
|
||||||
|
|
||||||
wpa_supplicant_event(drv->ctx, EVENT_DRIVER_CLIENT_POLL_OK, &data);
|
wpa_supplicant_event(drv->ctx, EVENT_DRIVER_CLIENT_POLL_OK, &data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user