summaryrefslogtreecommitdiff
path: root/mesh/model.c
diff options
context:
space:
mode:
authorInga Stotland <inga.stotland@intel.com>2020-08-20 22:48:56 -0700
committerBrian Gix <brian.gix@intel.com>2020-08-22 07:20:26 -0700
commit43f0c044acf99c6a2781f0bb26e084995d3e7c98 (patch)
treeb66d434f0dec17899969f428284cd52ed90b8395 /mesh/model.c
parent4de3420d3352e0773dd6e4a8ef665247a0da8bc2 (diff)
downloadbluez-43f0c044acf99c6a2781f0bb26e084995d3e7c98.tar.gz
mesh: Use valid net key index when handling Send call
Retrieve value of bound Net Key index based on the value of passed AppKey index. Check if the key is present and fail early in case of error. Also, pass the correct NetKey index to model layer in mesh_model_send(), instead of hard coded 0.
Diffstat (limited to 'mesh/model.c')
-rw-r--r--mesh/model.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/mesh/model.c b/mesh/model.c
index c1497de6a..bb5d30083 100644
--- a/mesh/model.c
+++ b/mesh/model.c
@@ -547,8 +547,6 @@ static bool msg_send(struct mesh_node *node, bool cred, uint16_t src,
l_debug("no app key for (%x)", app_idx);
return false;
}
-
- net_idx = appkey_net_idx(node_get_net(node), app_idx);
}
out = l_malloc(out_len);