Do not flush PMKSA cache on restoring dedicated per-ESS MAC address

Now that we check in PMKSA cache code whether the entry was created for
the same local address, it is fine to leave the old entries in the cache
even if we have changed addresses. This allows a valid PMKSA cache entry
to be used when restoring the same MAC address for the same ESS.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2022-12-18 12:04:36 +02:00
parent 1d4027fdbe
commit 8717110db1

View file

@ -2452,7 +2452,8 @@ void wpa_supplicant_associate(struct wpa_supplicant *wpa_s,
if (status < 0)
return;
if (status > 0) /* MAC changed */
if (rand_style != WPAS_MAC_ADDR_STYLE_DEDICATED_PER_ESS &&
status > 0) /* MAC changed */
wpa_sm_pmksa_cache_flush(wpa_s->wpa, ssid);
} else if (rand_style == WPAS_MAC_ADDR_STYLE_PERMANENT &&
wpa_s->mac_addr_changed) {