From 73b9ff646fbdd38c6da4b7f950f1d9b67f9374d5 Mon Sep 17 00:00:00 2001 From: Brian Gix Date: Mon, 25 Nov 2019 10:58:42 -0800 Subject: [PATCH] mesh: Ignore Composition features during attach Node Features are currently all under the control of the mesh daemon, and should be ignored when attaching. Eventually all Composition feature bits will be controlled by a master mesh.conf file, overriding any local node specific settings. Change-Id: I6aec29942e0ad3416d6fd1e64a87604012acd13c Signed-off-by: Abhay Agarwal --- mesh/node.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mesh/node.c b/mesh/node.c index 7d48bdf..3ad47f0 100644 --- a/mesh/node.c +++ b/mesh/node.c @@ -1429,6 +1429,10 @@ static bool check_req_node(struct managed_obj_request *req) uint16_t attach_len = node_generate_comp(req->attach, attach_comp, sizeof(attach_comp)); + /* Ignore feature bits in Composition Compare */ + node_comp[8] = 0; + attach_comp[8] = 0; + if (node_len != attach_len || memcmp(node_comp, attach_comp, node_len)) { l_debug("Failed to verify app's composition data"); -- 2.7.4