From 8717110db1a6e16592f7e4fdb03458c9790a1026 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 18 Dec 2022 12:04:36 +0200 Subject: [PATCH] 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 --- wpa_supplicant/wpa_supplicant.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index d3ca2a2dd..c17b67aac 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -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) { -- 2.47.2