[PATCH 45/58] NAN: Add security support in NAF transmit flow

Andrei Otcheretianski andrei.otcheretianski at intel.com
Thu Feb 19 12:25:01 PST 2026


From: Ilan Peer <ilan.peer at intel.com>

1. Add NAN security attributes when needed.
2. Perform pre-Tx frames processing based on the current
   state of the NDP state machine and frame subtype.

Signed-off-by: Ilan Peer <ilan.peer at intel.com>
---
 src/nan/nan.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/nan/nan.c b/src/nan/nan.c
index 98cc4e94d8..40dd0d2963 100644
--- a/src/nan/nan.c
+++ b/src/nan/nan.c
@@ -1068,6 +1068,10 @@ static int nan_action_build(struct nan_data *nan, struct nan_peer *peer,
 	if (ret)
 		return ret;
 
+	ret = nan_sec_add_attrs(nan, peer, subtype, buf);
+	if (ret)
+		return ret;
+
 	ret = nan_ndl_add_avail_attrs(nan, peer, buf);
 	if (ret)
 		return ret;
@@ -1106,6 +1110,10 @@ static int nan_action_send(struct nan_data *nan, struct nan_peer *peer,
 	if (ret)
 		goto out;
 
+	ret = nan_sec_pre_tx(nan, peer, buf);
+	if (ret)
+		goto out;
+
 	ret = nan->cfg->send_naf(nan->cfg->cb_ctx, peer->nmi_addr, NULL,
 				 nan->cluster_id, buf);
 
-- 
2.52.0




More information about the Hostap mailing list