[PATCH] NAN: Fix setting PBM in NAN discovery event
Andrei Otcheretianski
andrei.otcheretianski at intel.com
Thu May 14 01:34:17 PDT 2026
From: Ilan Peer <ilan.peer at intel.com>
The pairing and bootstrapping value was set before the NAN discovery
object was memset. Fix this by moving the memset() call earlier.
Signed-off-by: Ilan Peer <ilan.peer at intel.com>
---
src/common/nan_de.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/common/nan_de.c b/src/common/nan_de.c
index c5b1022772..ba61412bd9 100644
--- a/src/common/nan_de.c
+++ b/src/common/nan_de.c
@@ -1529,6 +1529,7 @@ static bool nan_de_rx_publish(struct nan_de *de, struct nan_de_service *srv,
}
send_event:
+ os_memset(&res, 0, sizeof(res));
if (buf && buf_len > 0) {
/* Parse Cipher Suite Information Attribute */
cipher_suite_count = nan_de_parse_csia(
@@ -1552,7 +1553,6 @@ send_event:
res.pbm = nan_de_get_advertise_pbm(buf, buf_len);
}
- os_memset(&res, 0, sizeof(res));
res.subscribe_id = srv->id;
res.srv_proto_type = srv_proto_type;
res.ssi = ssi;
--
2.53.0
More information about the Hostap
mailing list