Skip to contentSkip to conversation

mesh: Send correct NetKey index in DevKeyMessageReceived

PATCH Applied Inga Stotland 2 participants 2 messages Aug 19, 2020 – Aug 20, 2020 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mesh: Send correct NetKey index in DevKeyMessageReceived

The value of net_index in DevKeyMessageReceived() method must be set to the value of a subnet index on which a device key encoded message has been received. Was hard coded to 0. Fixed.

---
 mesh/model.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
mesh/model.c +2 -1
index b44e2f669..9529dfb2e 100644
@@ -965,7 +965,8 @@ bool mesh_model_rx(struct mesh_node *node, bool szmict, uint32_t seq0,
 			else if (decrypt_idx == APP_IDX_DEV_REMOTE ||
 				 decrypt_idx == APP_IDX_DEV_LOCAL)
 				send_dev_key_msg_rcvd(node, i, src, decrypt_idx,
-						0, forward.size, forward.data);
+							net_idx, forward.size,
+								forward.data);
 		}
 
 		/*
Signature · 1 line
2.26.2
Applied
#1 lore raw

Applied

Quoted 21 lines · Inga Stotland

The value of net_index in DevKeyMessageReceived() method must be set to the value of a subnet index on which a device key encoded message has been received. Was hard coded to 0. Fixed.

---
 mesh/model.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
mesh/model.c +2 -1
index b44e2f669..9529dfb2e 100644
@@ -965,7 +965,8 @@ bool mesh_model_rx(struct mesh_node *node, bool szmict, uint32_t seq0,
 			else if (decrypt_idx == APP_IDX_DEV_REMOTE ||
 				 decrypt_idx == APP_IDX_DEV_LOCAL)
 				send_dev_key_msg_rcvd(node, i, src, decrypt_idx,
-						0, forward.size, forward.data);
+							net_idx, forward.size,
+								forward.data);
 		}
 
 		/*