mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-17 18:34:03 -05:00
Add more debug info on deauth/disassoc events and commands
This commit is contained in:
parent
43dd46b3bc
commit
2e75a2b3a6
@ -2412,7 +2412,8 @@ nla_put_failure:
|
|||||||
static int wpa_driver_nl80211_disconnect(struct wpa_driver_nl80211_data *drv,
|
static int wpa_driver_nl80211_disconnect(struct wpa_driver_nl80211_data *drv,
|
||||||
const u8 *addr, int reason_code)
|
const u8 *addr, int reason_code)
|
||||||
{
|
{
|
||||||
wpa_printf(MSG_DEBUG, "%s", __func__);
|
wpa_printf(MSG_DEBUG, "%s(addr=" MACSTR " reason_code=%d)",
|
||||||
|
__func__, MAC2STR(addr), reason_code);
|
||||||
drv->associated = 0;
|
drv->associated = 0;
|
||||||
return wpa_driver_nl80211_mlme(drv, addr, NL80211_CMD_DISCONNECT,
|
return wpa_driver_nl80211_mlme(drv, addr, NL80211_CMD_DISCONNECT,
|
||||||
reason_code, 0);
|
reason_code, 0);
|
||||||
@ -2426,7 +2427,8 @@ static int wpa_driver_nl80211_deauthenticate(void *priv, const u8 *addr,
|
|||||||
struct wpa_driver_nl80211_data *drv = bss->drv;
|
struct wpa_driver_nl80211_data *drv = bss->drv;
|
||||||
if (!(drv->capa.flags & WPA_DRIVER_FLAGS_SME))
|
if (!(drv->capa.flags & WPA_DRIVER_FLAGS_SME))
|
||||||
return wpa_driver_nl80211_disconnect(drv, addr, reason_code);
|
return wpa_driver_nl80211_disconnect(drv, addr, reason_code);
|
||||||
wpa_printf(MSG_DEBUG, "%s", __func__);
|
wpa_printf(MSG_DEBUG, "%s(addr=" MACSTR " reason_code=%d)",
|
||||||
|
__func__, MAC2STR(addr), reason_code);
|
||||||
drv->associated = 0;
|
drv->associated = 0;
|
||||||
return wpa_driver_nl80211_mlme(drv, addr, NL80211_CMD_DEAUTHENTICATE,
|
return wpa_driver_nl80211_mlme(drv, addr, NL80211_CMD_DEAUTHENTICATE,
|
||||||
reason_code, 0);
|
reason_code, 0);
|
||||||
|
@ -1604,6 +1604,13 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
|
|||||||
break;
|
break;
|
||||||
case EVENT_DISASSOC:
|
case EVENT_DISASSOC:
|
||||||
wpa_printf(MSG_DEBUG, "Disassociation notification");
|
wpa_printf(MSG_DEBUG, "Disassociation notification");
|
||||||
|
if (data) {
|
||||||
|
wpa_printf(MSG_DEBUG, " * reason %u",
|
||||||
|
data->disassoc_info.reason_code);
|
||||||
|
if (data->disassoc_info.addr)
|
||||||
|
wpa_printf(MSG_DEBUG, " * address " MACSTR,
|
||||||
|
MAC2STR(data->disassoc_info.addr));
|
||||||
|
}
|
||||||
#ifdef CONFIG_AP
|
#ifdef CONFIG_AP
|
||||||
if (wpa_s->ap_iface && data) {
|
if (wpa_s->ap_iface && data) {
|
||||||
hostapd_notif_disassoc(wpa_s->ap_iface->bss[0],
|
hostapd_notif_disassoc(wpa_s->ap_iface->bss[0],
|
||||||
@ -1619,8 +1626,17 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
|
|||||||
case EVENT_DEAUTH:
|
case EVENT_DEAUTH:
|
||||||
if (event == EVENT_DEAUTH) {
|
if (event == EVENT_DEAUTH) {
|
||||||
wpa_printf(MSG_DEBUG, "Deauthentication notification");
|
wpa_printf(MSG_DEBUG, "Deauthentication notification");
|
||||||
if (data)
|
if (data) {
|
||||||
reason_code = data->deauth_info.reason_code;
|
reason_code = data->deauth_info.reason_code;
|
||||||
|
wpa_printf(MSG_DEBUG, " * reason %u",
|
||||||
|
data->deauth_info.reason_code);
|
||||||
|
if (data->deauth_info.addr) {
|
||||||
|
wpa_printf(MSG_DEBUG, " * address "
|
||||||
|
MACSTR,
|
||||||
|
MAC2STR(data->deauth_info.
|
||||||
|
addr));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#ifdef CONFIG_AP
|
#ifdef CONFIG_AP
|
||||||
if (wpa_s->ap_iface && data) {
|
if (wpa_s->ap_iface && data) {
|
||||||
|
Loading…
Reference in New Issue
Block a user