[PATCH 07/15] NAN: Ignore SDFs with a non-matching Cluster ID for sync services
Andrei Otcheretianski
andrei.otcheretianski at intel.com
Thu Oct 8 09:05:16 PDT 2026
From: Ilan Peer <ilan.peer at intel.com>
Skip synchronized services in nan_de_rx_sda() unless the received A3
matches the locally stored Cluster ID.
Signed-off-by: Ilan Peer <ilan.peer at intel.com>
---
src/common/nan_de.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/src/common/nan_de.c b/src/common/nan_de.c
index 41f9e3c7ae..4a49164e6e 100644
--- a/src/common/nan_de.c
+++ b/src/common/nan_de.c
@@ -2979,6 +2979,22 @@ static bool nan_de_rx_sda(struct nan_de *de, const u8 *peer_addr, const u8 *a3,
NAN_SERVICE_ID_LEN) != 0)
continue;
}
+
+ /*
+ * Synchronized services are bound to a single NAN cluster and
+ * the SDF carries the Cluster ID in A3.
+ */
+ if (srv->sync &&
+ (!de->cluster_id_set || !a3 ||
+ !ether_addr_equal(a3, de->cluster_id))) {
+ wpa_printf(MSG_DEBUG,
+ "NAN: Skip sync service id %u - Cluster ID mismatch (RX A3 "
+ MACSTR " local " MACSTR ")",
+ srv->id, MAC2STR(a3 ? a3 : wildcard_bssid),
+ MAC2STR(de->cluster_id));
+ continue;
+ }
+
if (type == NAN_SRV_CTRL_PUBLISH) {
if (srv->type == NAN_DE_PUBLISH)
continue;
--
2.53.0
More information about the Hostap
mailing list