Skip to contentSkip to conversation

mesh: Fix clean-up introduced check

PATCH New Brian Gix 1 participant 1 message Jun 9, 2020 Bluetooth drivers

lore
Share & tools
lore

Brian Gix

author
#0 lore raw

PATCH 1/1 mesh: Fix clean-up introduced check

Before the clean-up we were making a useless check of an otherwise unused boolean (net->provisioner). The was replaced a check where we actually take the node type (node->provisioner). However, it turns out that the check was incorrect in the first place.

---
 mesh/model.c | 2 +-
 mesh/net.c   | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)
mesh/model.c +1 -1
index f2dfb2644..5ed95afac 100644
@@ -907,7 +907,7 @@ bool mesh_model_rx(struct mesh_node *node, bool szmict, uint32_t seq0,
 	 * The packet needs to be decoded by the correct key which
 	 * is hinted by key_aid, but is not necessarily definitive
 	 */
-	if (key_aid == APP_AID_DEV || node_is_provisioner(node))
+	if (key_aid == APP_AID_DEV)
 		decrypt_idx = dev_packet_decrypt(node, data, size, szmict, src,
 						dst, key_aid, seq0, iv_index,
 						clear_text);
mesh/net.c +0 -1
index c12dd6541..7dbe45f7d 100644
@@ -108,7 +108,6 @@ struct mesh_net {
 	bool friend_enable;
 	bool beacon_enable;
 	bool proxy_enable;
-	bool provisioner;
 	bool friend_seq;
 	struct l_timeout *iv_update_timeout;
 	enum _iv_upd_state iv_upd_state;
Signature · 1 line
2.25.4