From 599fc04118babc61900d5075d37a59a0ce3080f4 Mon Sep 17 00:00:00 2001 From: Mathy Vanhoef Date: Tue, 12 May 2020 18:53:59 +0400 Subject: [PATCH] fragattacks: don't expect auth/assoc to be ACKed with hwsim --- src/ap/ieee802_11.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c index fdbdaf011..6074a9dab 100644 --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c @@ -4927,12 +4927,15 @@ static void handle_auth_cb(struct hostapd_data *hapd, auth_transaction = le_to_host16(mgmt->u.auth.auth_transaction); status_code = le_to_host16(mgmt->u.auth.status_code); + // Ignore if frame wasn't ACK'ed (this is normal in our hwsim setup). +#if 0 if (!ok) { hostapd_logger(hapd, mgmt->da, HOSTAPD_MODULE_IEEE80211, HOSTAPD_LEVEL_NOTICE, "did not acknowledge authentication response"); goto fail; } +#endif if (len < IEEE80211_HDRLEN + sizeof(mgmt->u.auth)) { wpa_printf(MSG_INFO, "handle_auth_cb - too short payload (len=%lu)", @@ -5015,6 +5018,8 @@ static void handle_assoc_cb(struct hostapd_data *hapd, else status = le_to_host16(mgmt->u.assoc_resp.status_code); + // Ignore if frame wasn't ACK'ed (this is normal in our hwsim setup). +#if 0 if (!ok) { hostapd_logger(hapd, mgmt->da, HOSTAPD_MODULE_IEEE80211, HOSTAPD_LEVEL_DEBUG, @@ -5026,6 +5031,7 @@ static void handle_assoc_cb(struct hostapd_data *hapd, return; } +#endif if (status != WLAN_STATUS_SUCCESS) return;