]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Work around interop issue with WPA type EAPOL-Key 4/4 in WPA2 mode
authorJouni Malinen <j@w1.fi>
Sun, 22 Jan 2012 10:23:28 +0000 (12:23 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 22 Jan 2012 10:23:28 +0000 (12:23 +0200)
Some deployed station implementations seem to send msg 4/4 with
incorrect type value in WPA2 mode. Add a workaround to ignore that issue
so that such stations can interoperate with hostapd authenticator. The
validation checks were added in commit
f8e96eb6fd960a017793942cff0eb43b09f444c6.

Signed-hostap: Jouni Malinen <j@w1.fi>

src/ap/wpa_auth.c

index 9da5609aa357549c0fbde71fabffdcf9c3d660b8..c4d77bf80d89a4e1f8df069fa8b1c560beee8797 100644 (file)
@@ -795,7 +795,14 @@ void wpa_receive(struct wpa_authenticator *wpa_auth,
        }
 
        if (sm->wpa == WPA_VERSION_WPA2) {
-               if (key->type != EAPOL_KEY_TYPE_RSN) {
+               if (key->type == EAPOL_KEY_TYPE_WPA) {
+                       /*
+                        * Some deployed station implementations seem to send
+                        * msg 4/4 with incorrect type value in WPA2 mode.
+                        */
+                       wpa_printf(MSG_DEBUG, "Workaround: Allow EAPOL-Key "
+                                  "with unexpected WPA type in RSN mode");
+               } else if (key->type != EAPOL_KEY_TYPE_RSN) {
                        wpa_printf(MSG_DEBUG, "Ignore EAPOL-Key with "
                                   "unexpected type %d in RSN mode",
                                   key->type);