mesh: Use valid net key index when handling Send call
authorInga Stotland <inga.stotland@intel.com>
Fri, 21 Aug 2020 05:48:56 +0000 (22:48 -0700)
committerAbhay Agarwal <ay.agarwal@samsung.com>
Mon, 28 Dec 2020 06:20:04 +0000 (11:50 +0530)
commiteedb015016527317173fb24cbd72abf36026e2b2
tree72a0ef8f8d1c666ec66fe18ef5957ccf3561cc84
parent23c57409d7b6b10304c8cda84bb68e7976607f8f
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.

Change-Id: Ia876bb512cc877a3634ef3aa1f20b8fd4ddedb15
Signed-off-by: anuj.bhumiya <anuj.bhumiya@samsung.com>
mesh/model.c
mesh/node.c