]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
FT: Store PTKSA entry for the correct BSSID in the FT protocol case
authorJouni Malinen <quic_jouni@quicinc.com>
Tue, 21 Feb 2023 15:25:50 +0000 (17:25 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 21 Feb 2023 15:27:29 +0000 (17:27 +0200)
sm->bssid has not yet been updated here, so use the provided bssid
instead. This avoids replacing the PTKSA entry for the previous AP when
a new PTKSA is being stored while using the FT protocol.

Fixes: d70060f9665a ("WPA: Add PTKSA cache to wpa_supplicant for PASN")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
src/rsn_supp/wpa_ft.c

index 411596ad1b1c7f7a3134390180bec1af191307c7..497d91e6dc7cf8cfb966a78b7128313647383bb3 100644 (file)
@@ -511,7 +511,7 @@ static int wpa_ft_install_ptk(struct wpa_sm *sm, const u8 *bssid)
        }
        sm->tk_set = true;
 
-       wpa_sm_store_ptk(sm, sm->bssid, sm->pairwise_cipher,
+       wpa_sm_store_ptk(sm, bssid, sm->pairwise_cipher,
                         sm->dot11RSNAConfigPMKLifetime, &sm->ptk);
        return 0;
 }