]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AP MLD: Store PMKSA from DPP to both per-link and MLD-level cache
authorChenming Huang <quic_chenhuan@quicinc.com>
Wed, 26 Feb 2025 14:32:26 +0000 (20:02 +0530)
committerJouni Malinen <j@w1.fi>
Thu, 27 Feb 2025 10:11:44 +0000 (12:11 +0200)
When we cannot determine whether the peer is non-AP MLD (which is the
case with DPP AKM), store the PMKSA into both the MLD-level and per-link
caches when operating as an AP MLD.

Signed-off-by: Chenming Huang <quic_chenhuan@quicinc.com>
src/ap/dpp_hostapd.c

index a5853f8d3938976af0cd6cabfc6ad51df4046eaf..d94ca9e8232f37c2ecc22c4e99afec2a5265b6d4 100644 (file)
@@ -2165,6 +2165,17 @@ static void hostapd_dpp_rx_peer_disc_req(struct hostapd_data *hapd,
                goto done;
        }
 
+#ifdef CONFIG_IEEE80211BE
+       if (hapd->conf->mld_ap &&
+           wpa_auth_pmksa_add2(hapd->wpa_auth, src, intro.pmk, intro.pmk_len,
+                               intro.pmkid, expiration,
+                               WPA_KEY_MGMT_DPP, pkhash, true) < 0) {
+               wpa_printf(MSG_ERROR,
+                          "DPP: Failed to add PMKSA cache entry (MLD)");
+               goto done;
+       }
+#endif /* CONFIG_IEEE80211BE */
+
        hostapd_dpp_send_peer_disc_resp(hapd, src, freq, trans_id[0],
                                        DPP_STATUS_OK);
 done:
@@ -2939,6 +2950,17 @@ hostapd_dpp_rx_priv_peer_intro_update(struct hostapd_data *hapd, const u8 *src,
                goto done;
        }
 
+#ifdef CONFIG_IEEE80211BE
+       if (hapd->conf->mld_ap &&
+           wpa_auth_pmksa_add2(hapd->wpa_auth, src, intro.pmk, intro.pmk_len,
+                               intro.pmkid, expiration,
+                               WPA_KEY_MGMT_DPP, pkhash, true) < 0) {
+               wpa_printf(MSG_ERROR,
+                          "DPP: Failed to add PMKSA cache entry (MLD)");
+               goto done;
+       }
+#endif /* CONFIG_IEEE80211BE */
+
        wpa_printf(MSG_DEBUG, "DPP: Private Peer Introduction completed with "
                   MACSTR, MAC2STR(src));