]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P2: Select PMKSA based on P2P Device Address and PMKID match
authorShivani Baranwal <quic_shivbara@quicinc.com>
Sun, 4 Aug 2024 22:12:08 +0000 (03:42 +0530)
committerJouni Malinen <j@w1.fi>
Sun, 13 Oct 2024 18:41:53 +0000 (21:41 +0300)
Extend GO (AP) PMKSA selection to use P2P Device Address when searching
for a matching PMKSA.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
src/ap/wpa_auth_ie.c

index 43d9c1d321f16429c31ed99db174c8015106e69b..6998f980dd7ce3809fba5d9cb1a1ce8e77c8535e 100644 (file)
@@ -1247,6 +1247,10 @@ wpa_validate_wpa_ie(struct wpa_authenticator *wpa_auth,
                            &data.pmkid[i * PMKID_LEN], PMKID_LEN);
                sm->pmksa = pmksa_cache_auth_get(wpa_auth->pmksa, sm->addr,
                                                 &data.pmkid[i * PMKID_LEN]);
+               if (!sm->pmksa && !is_zero_ether_addr(sm->p2p_dev_addr))
+                       sm->pmksa = pmksa_cache_auth_get(
+                               wpa_auth->pmksa, sm->p2p_dev_addr,
+                               &data.pmkid[i * PMKID_LEN]);
                if (sm->pmksa) {
                        pmkid = sm->pmksa->pmkid;
                        break;