rinehaidvon opened a new issue, #1310:
URL: https://github.com/apache/mynewt-nimble/issues/1310

   when bt_mesh_model_send was called in two different thread. there are two 
msgs send in the same time.
   
   bt_mesh_model_send -> model_send -> bt_mesh_trans_send -> trans_encrypt 
   
   in function trans_encrypt, use current seqence num to create app nonce. 
maybe use same seqence num to create app nonce and encrypt different two msgs
   
   and then the msg send to network layer.
   
   bt_mesh_trans_send -> bt_mesh_net_send -> net_header_encode
   
   in function net_header_encode, put current seqence num into network pdu 
header and increase seqence num. 
   
   
   for example 
   
   send:
   
   transport layer:
   thread 1 send msg 1, use seqence num 1 to create app nonce, use appkey and 
app nonce encrypt msg 1
   thread 2 send msg 2, use seqence num 1 to create app nonce, use appkey and 
app nonce encrypt msg 2
   
   network layer:
   thread 1 send msg 1, put seqence num 1 into netowrk header of msg 1, and 
seqence num increase
   thread 2 send msg 2, put seqence num 2 into netowrk header of msg 2, and 
seqence num increase
   
   recv:
   
   recv msg 1, and msg 1 can be processed ok
   
   recv msg 2
   network layer
   parse network header, get seqence num is 2
   transport layer
   use seqence num 2 to create app nonce, so it can not be decrypted 
   
   Waiting for your replies! thank you so much!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to