]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
hostapd: Add logging around Michael MIC related failures
authorBen Greear <greearb@candelatech.com>
Thu, 7 Dec 2017 17:14:49 +0000 (09:14 -0800)
committerJouni Malinen <j@w1.fi>
Mon, 2 Apr 2018 13:51:29 +0000 (16:51 +0300)
This can help one understand better why stations are failing
to authentication/associate.

Signed-off-by: Ben Greear <greearb@candelatech.com>
src/ap/ieee802_11.c
src/ap/tkip_countermeasures.c

index 3fe8af0ce7a6c8ac26f77d36b678d72067867aee..4394d37bf86b994535e04ee64528fbfe4361c861 100644 (file)
@@ -1729,6 +1729,8 @@ static void handle_auth(struct hostapd_data *hapd,
 #endif /* CONFIG_NO_RC4 */
 
        if (hapd->tkip_countermeasures) {
+               wpa_printf(MSG_DEBUG,
+                          "Ongoing TKIP countermeasures (Michael MIC failure) - reject authentication");
                resp = WLAN_STATUS_UNSPECIFIED_FAILURE;
                goto fail;
        }
index 4725e2b3e8f1eb24c502df8f00dad3a7b5e5dafa..557570cd1bc4085c1f85c1193f448a9d39595909 100644 (file)
@@ -71,6 +71,11 @@ int michael_mic_failure(struct hostapd_data *hapd, const u8 *addr, int local)
        struct os_reltime now;
        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) {
                struct sta_info *sta = ap_get_sta(hapd, addr);
                if (sta != NULL) {