FILS: Do not try to add PMKSA cache entry if caching is disabled

This gets rid of a confusing error message "FILS: Failed to add PMKSA
cache entry based on ERP" for cases where PMKSA caching is disabled in
hostapd (disable_pmksa_caching=1). Functionality remains unchanged,
i.e., no cache entry was added before this change either.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
Jouni Malinen 2019-03-13 16:34:48 +02:00 committed by Jouni Malinen
parent 02bde9581f
commit aabbdb818d

View file

@ -1753,7 +1753,8 @@ prepare_auth_resp_fils(struct hostapd_data *hapd,
} }
sta->fils_erp_pmkid_set = 0; sta->fils_erp_pmkid_set = 0;
if (wpa_auth_pmksa_add2( if (!hapd->conf->disable_pmksa_caching &&
wpa_auth_pmksa_add2(
hapd->wpa_auth, sta->addr, hapd->wpa_auth, sta->addr,
pmk, pmk_len, pmk, pmk_len,
sta->fils_erp_pmkid, sta->fils_erp_pmkid,