]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Fix EAPOL_SM_USES_WPA flag to be set correctly
authorJouni Malinen <j@w1.fi>
Sat, 1 May 2010 14:12:59 +0000 (17:12 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 1 May 2010 14:12:59 +0000 (17:12 +0300)
Commit c02d52b405fb017e1eec80082dbe433fec53d9c2 removed direct calls
to the WPA authenticator, but the change here was incorrect.
EAPOL_SM_USES_WPA was supposed to be set based on sta->wpa_sm being
set, i.e., no need to check for PMKSA entries for that.

While this could potentially change EAPOL Key TX state machine behavior,
no clear problems have been identified so far. Anyway, better fix this
to get the correct flags set for EAPOL authenticator state machine.

src/ap/ieee802_1x.c

index dd1b6d558867caa31857810c046391f57188cb33..b8676ed634bab05751b4e159a0236ed51e06c7df 100644 (file)
@@ -646,8 +646,7 @@ ieee802_1x_alloc_eapol_sm(struct hostapd_data *hapd, struct sta_info *sta)
        if (sta->flags & WLAN_STA_PREAUTH)
                flags |= EAPOL_SM_PREAUTH;
        if (sta->wpa_sm) {
-               if (wpa_auth_sta_get_pmksa(sta->wpa_sm))
-                       flags |= EAPOL_SM_USES_WPA;
+               flags |= EAPOL_SM_USES_WPA;
                if (wpa_auth_sta_get_pmksa(sta->wpa_sm))
                        flags |= EAPOL_SM_FROM_PMKSA_CACHE;
        }