[RFC v2 95/99] NAN: Indicate if new keys are derived or previous NDP exists
Andrei Otcheretianski
andrei.otcheretianski at intel.com
Tue Dec 23 03:52:39 PST 2025
Extend nan_ndp_connection_params struct to indicate whether new keys
were derived and whether this is the first NDP established with the
peer.
This is needed by wpa_supplicant to skip STA capabilities and keys
configuration accordingly.
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski at intel.com>
---
src/nan/nan.c | 7 ++++---
src/nan/nan.h | 4 ++++
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/nan/nan.c b/src/nan/nan.c
index 8703572794..1008cc9fa7 100644
--- a/src/nan/nan.c
+++ b/src/nan/nan.c
@@ -1294,9 +1294,10 @@ static int nan_ndp_connected(struct nan_data *nan, struct nan_peer *peer)
params.peer_ndi = peer->ndp_setup.ndp->init_ndi;
}
- nan_sec_ndp_store_keys(nan, peer, params.peer_ndi,
- params.local_ndi);
-
+ params.install_keys = nan_sec_ndp_store_keys(nan, peer,
+ params.peer_ndi,
+ params.local_ndi);
+ params.first_ndp = dl_list_empty(&peer->ndps);
if (nan->cfg->ndp_connected(nan->cfg->cb_ctx, ¶ms)) {
wpa_printf(MSG_DEBUG,
"NAN: NDP connected notification failed");
diff --git a/src/nan/nan.h b/src/nan/nan.h
index a3dbc4f481..3ddf47f2cb 100644
--- a/src/nan/nan.h
+++ b/src/nan/nan.h
@@ -259,6 +259,8 @@ struct nan_ndp_params {
* @local_ndi: local NDI MAC address
* @ssi: service specific information
* @ssi_len: service specific information length
+ * @install_keys: whether the new keys should be installed
+ * @first_ndp: whether this is the first NDP with the peer
*/
struct nan_ndp_connection_params {
struct nan_ndp_id ndp_id;
@@ -266,6 +268,8 @@ struct nan_ndp_connection_params {
const u8 *local_ndi;
const u8 *ssi;
size_t ssi_len;
+ bool install_keys;
+ bool first_ndp;
};
/*
--
2.49.0
More information about the Hostap
mailing list