summaryrefslogtreecommitdiff
path: root/mesh/model.c
diff options
context:
space:
mode:
authorMichaƂ Lowas-Rzechonek <michal.lowas-rzechonek@silvair.com>2020-01-09 11:32:22 +0100
committerBrian Gix <brian.gix@intel.com>2020-01-14 06:32:23 -0800
commit038b0b11e1a970939c6a5dc0b561bf166c1b2448 (patch)
tree30124641e89292c4fb937feb01641c6854a0a8e8 /mesh/model.c
parente2b66089348c9f1083554cdf49710ddbf28c3942 (diff)
downloadbluez-038b0b11e1a970939c6a5dc0b561bf166c1b2448.tar.gz
mesh: Allow apps to receive DevKey messages from external nodes
After introducing "remote" flag for DevKeyMessageReceived in c8cd5b04ccd865deeb90b70ea649c0b6cc0385e6, we can now allow applications to received DevKey messages from external addresses as well as from local ones. This enables applications to properly implement models using DevKey security, by accepting only requests with "remote" flag set to false.
Diffstat (limited to 'mesh/model.c')
-rw-r--r--mesh/model.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/mesh/model.c b/mesh/model.c
index acdd94f7b..6d7674ee5 100644
--- a/mesh/model.c
+++ b/mesh/model.c
@@ -1066,8 +1066,7 @@ bool mesh_model_rx(struct mesh_node *node, bool szmict, uint32_t seq0,
forward.app_idx, forward.size,
forward.data);
else if (decrypt_idx == APP_IDX_DEV_REMOTE ||
- (decrypt_idx == APP_IDX_DEV_LOCAL &&
- mesh_net_is_local_address(net, src, 1)))
+ decrypt_idx == APP_IDX_DEV_LOCAL)
send_dev_key_msg_rcvd(node, i, src, decrypt_idx,
0, forward.size, forward.data);
}