aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2020-03-08 11:11:50 (GMT)
committerJouni Malinen <j@w1.fi>2020-03-08 14:16:11 (GMT)
commitc7d293024b8f122fcfc7d0474730299b98c1087e (patch)
treef4c4602e6b5dcc76b70671c5ab4ad5623405069c
parentf4bf6a5d44b3ea989f6f72de3520a3e814024330 (diff)
downloadhostap-c7d293024b8f122fcfc7d0474730299b98c1087e.zip
hostap-c7d293024b8f122fcfc7d0474730299b98c1087e.tar.gz
hostap-c7d293024b8f122fcfc7d0474730299b98c1087e.tar.bz2
RSN: Stop 4-way handshake if scan results are not available
While there may have initially been cases where the RSNE from Beacon/Probe Response frames was not available from some drivers, it is now more valuable to notice if such a case were to be hit with drivers that are always expected to have such information available. As such, make it a fatal error if the scan results for the current AP are not available to check the RSNE/RSNXE in EAPOL-Key msg 3/4. Signed-off-by: Jouni Malinen <j@w1.fi>
-rw-r--r--src/rsn_supp/wpa.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c
index 39bc13d..5bb47bc 100644
--- a/src/rsn_supp/wpa.c
+++ b/src/rsn_supp/wpa.c
@@ -1424,11 +1424,10 @@ static int wpa_supplicant_validate_ie(struct wpa_sm *sm,
wpa_msg(sm->ctx->msg_ctx, MSG_WARNING,
"WPA: Could not find AP from "
"the scan results");
- } else {
- wpa_msg(sm->ctx->msg_ctx, MSG_DEBUG,
- "WPA: Found the current AP from "
- "updated scan results");
+ return -1;
}
+ wpa_msg(sm->ctx->msg_ctx, MSG_DEBUG,
+ "WPA: Found the current AP from updated scan results");
}
if (ie->wpa_ie == NULL && ie->rsn_ie == NULL &&