diff options
author | Isak Westin <isak.westin@loytec.com> | 2022-09-29 13:03:42 +0200 |
---|---|---|
committer | Ayush Garg <ayush.garg@samsung.com> | 2023-05-15 14:55:55 +0530 |
commit | c06610c4f0590a8af06074641492dc2923b91478 (patch) | |
tree | 234d51a4a867d18dd7ab8247f12a80cecead39ac | |
parent | 37fae28beb5a9e91535bb92b148af836fde18f1c (diff) | |
download | bluez-c06610c4f0590a8af06074641492dc2923b91478.tar.gz bluez-c06610c4f0590a8af06074641492dc2923b91478.tar.bz2 bluez-c06610c4f0590a8af06074641492dc2923b91478.zip |
mesh: Ignore SNB with invalid IV Index values
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.
Signed-off-by: Manika Shrivastava <manika.sh@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
-rw-r--r-- | mesh/net.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -2669,6 +2669,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; |