Skip to content

Commit

Permalink
mesh: Ignore SNB with invalid IV Index values
Browse files Browse the repository at this point in the history
If we are in IV update in progress state, and receive a Secure Network
beacon with an IV index equal to last known IV index + 1, and IV update
flag set to 1, it should be ignored. See MshPRFv1.0.1 section 3.10.5.
  • Loading branch information
iwestin authored and bgix committed Oct 3, 2022
1 parent 926d16d commit 7d05089
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mesh/net.c
Expand Up @@ -2671,6 +2671,10 @@ static bool update_iv_ivu_state(struct mesh_net *net, uint32_t iv_index,
if (iv_index == net->iv_index)
return false;

/* Ignore beacon with invalid IV index value */
if (net->iv_update && iv_index == net->iv_index + 1)
return false;

if (!net->iv_update) {
l_debug("iv_upd_state = IV_UPD_UPDATING");
net->iv_upd_state = IV_UPD_UPDATING;
Expand Down

0 comments on commit 7d05089

Please sign in to comment.