You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2017/11/01 10:04:19 UTC

[GitHub] jhedberg commented on a change in pull request #641: mesh: Fix and clean up iv update procedure

jhedberg commented on a change in pull request #641: mesh: Fix and clean up iv update procedure
URL: https://github.com/apache/mynewt-core/pull/641#discussion_r148221425
 
 

 ##########
 File path: net/nimble/host/mesh/src/net.c
 ##########
 @@ -556,40 +556,57 @@ void bt_mesh_iv_update(u32_t iv_index, bool iv_update)
 {
 	int i;
 
-	if (iv_index < bt_mesh.iv_index || iv_index > bt_mesh.iv_index + 42) {
-		BT_ERR("IV Index completely out of sync: 0x%08x != 0x%08x",
-			iv_index, bt_mesh.iv_index);
-		return;
-	}
+	/* If we are in normal*/
+	if (!bt_mesh.iv_update) {
 
 
 Review comment:
   I think you should add an initial check for (iv_index == bt_mesh.iv_index) here, since otherwise you'll get confusing errors for perfectly normal Secure Network Beacons which have the same IV Index as you.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services