hostapd: Add logging around Michael MIC related failures

This can help one understand better why stations are failing
to authentication/associate.

Signed-off-by: Ben Greear <greearb@candelatech.com>
This commit is contained in:
Ben Greear 2017-12-07 09:14:49 -08:00 committed by Jouni Malinen
parent e7525a2954
commit e2fc13d0ab
2 changed files with 7 additions and 0 deletions

View File

@ -1729,6 +1729,8 @@ static void handle_auth(struct hostapd_data *hapd,
#endif /* CONFIG_NO_RC4 */ #endif /* CONFIG_NO_RC4 */
if (hapd->tkip_countermeasures) { if (hapd->tkip_countermeasures) {
wpa_printf(MSG_DEBUG,
"Ongoing TKIP countermeasures (Michael MIC failure) - reject authentication");
resp = WLAN_STATUS_UNSPECIFIED_FAILURE; resp = WLAN_STATUS_UNSPECIFIED_FAILURE;
goto fail; goto fail;
} }

View File

@ -71,6 +71,11 @@ int michael_mic_failure(struct hostapd_data *hapd, const u8 *addr, int local)
struct os_reltime now; struct os_reltime now;
int ret = 0; int ret = 0;
hostapd_logger(hapd, addr, HOSTAPD_MODULE_IEEE80211,
HOSTAPD_LEVEL_INFO,
"Michael MIC failure detected in received frame%s",
local ? " (local)" : "");
if (addr && local) { if (addr && local) {
struct sta_info *sta = ap_get_sta(hapd, addr); struct sta_info *sta = ap_get_sta(hapd, addr);
if (sta != NULL) { if (sta != NULL) {