]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Set portValid=TRUE on association for driver-based 4-way handshake
authorJouni Malinen <jouni.malinen@atheros.com>
Mon, 31 Jan 2011 22:04:02 +0000 (00:04 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 31 Jan 2011 22:04:02 +0000 (00:04 +0200)
This was previously done for WPA/WPA2-Personal as part of association
processing when the driver is implementing 4-way handshake. The
portValid needs to be done for WPA/WPA2-Enterprise to get the proper
EAPOL authentication completed callback to configure PMK to the driver.

wpa_supplicant/events.c

index 6b6fcf7004f45795fc1b178dcffe20bb8b6da87c..a2556c693c6cd334f308a5e5853487a84c11b8f3 100644 (file)
@@ -1263,6 +1263,14 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s,
                wpa_supplicant_set_state(wpa_s, WPA_COMPLETED);
                eapol_sm_notify_portValid(wpa_s->eapol, TRUE);
                eapol_sm_notify_eap_success(wpa_s->eapol, TRUE);
+       } else if ((wpa_s->drv_flags & WPA_DRIVER_FLAGS_4WAY_HANDSHAKE) &&
+                  wpa_key_mgmt_wpa_ieee8021x(wpa_s->key_mgmt)) {
+               /*
+                * The driver will take care of RSN 4-way handshake, so we need
+                * to allow EAPOL supplicant to complete its work without
+                * waiting for WPA supplicant.
+                */
+               eapol_sm_notify_portValid(wpa_s->eapol, TRUE);
        }
 
        if (wpa_s->pending_eapol_rx) {