aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSunil Dutt <c_duttus@qti.qualcomm.com>2013-09-16 15:51:28 +0530
committerKamath Vinayak <vkamat@codeaurora.org>2013-09-16 16:07:14 +0530
commit518d5090e64c444f8822bf7ebd0b7d5a71aea628 (patch)
tree6d94c96337dfcda9d69c80b81bc63400e59ff99d
parent887960ac69a44d1348ebc6e1119dce884696d640 (diff)
downloadandroid_external_wpa_supplicant_8-518d5090e64c444f8822bf7ebd0b7d5a71aea628.tar.gz
android_external_wpa_supplicant_8-518d5090e64c444f8822bf7ebd0b7d5a71aea628.tar.bz2
android_external_wpa_supplicant_8-518d5090e64c444f8822bf7ebd0b7d5a71aea628.zip
Drop EAP packet with code 10 before EAPOL state machine processing
H3C WA2620i-AGN AP may send an EAP packet with an undefined EAP code 10 after successful EAP authentication which restarts the EAPOL state machine. Drop such frames with this unrecognized code without advancing the EAPOL supplicant or EAP peer state machines to avoid interoperability issues with the AP. Git-commit: aa78cd338f21eaf5a5ac15e92a155d86088e6fc6 Git-repo : git://w1.fi/srv/git/hostap.git Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com> CRs-fixed: 524546 Change-Id: Iad46bfb1d1a8cb0e7c8a03d5702721768890002c
-rw-r--r--src/eapol_supp/eapol_supp_sm.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/eapol_supp/eapol_supp_sm.c b/src/eapol_supp/eapol_supp_sm.c
index 361e0897..a677852d 100644
--- a/src/eapol_supp/eapol_supp_sm.c
+++ b/src/eapol_supp/eapol_supp_sm.c
@@ -1257,6 +1257,24 @@ int eapol_sm_rx_eapol(struct eapol_sm *sm, const u8 *src, const u8 *buf,
switch (hdr->type) {
case IEEE802_1X_TYPE_EAP_PACKET:
+ if (sm->conf.workaround) {
+ /*
+ * An AP has been reported to send out EAP message with
+ * undocumented code 10 at some point near the
+ * completion of EAP authentication. This can result in
+ * issues with the unexpected EAP message triggering
+ * restart of EAPOL authentication. Avoid this by
+ * skipping the message without advancing the state
+ * machine.
+ */
+ const struct eap_hdr *ehdr =
+ (const struct eap_hdr *) (hdr + 1);
+ if (plen >= sizeof(*ehdr) && ehdr->code == 10) {
+ wpa_printf(MSG_DEBUG, "EAPOL: Ignore EAP packet with unknown code 10");
+ break;
+ }
+ }
+
if (sm->cached_pmk) {
/* Trying to use PMKSA caching, but Authenticator did
* not seem to have a matching entry. Need to restart