diff options
author | Brian Gix <brian.gix@intel.com> | 2019-10-10 15:58:52 -0700 |
---|---|---|
committer | Brian Gix <brian.gix@intel.com> | 2019-10-14 13:32:26 -0700 |
commit | 9a6ffbbb88d8fb80f6e086e3da264b3505dfc904 (patch) | |
tree | a621b3b07fd10040dc89c8180c9f8915857293ad /mesh/mesh-config-json.c | |
parent | 4f5a1df1c4ddfbfea9fd46b43ca4ad3f67fd3858 (diff) | |
download | bluez-9a6ffbbb88d8fb80f6e086e3da264b3505dfc904.tar.gz |
mesh: Secure Beacon - IV_Index/Key Refresh re-write
This is a major rewrite of Secure Network Beacon (SNB) handling
that includes:
* Seperating Key Refresh from IV_Index handling
This is a clearer handling of the two features. Although both features
are represented in SNB's, they run independantly.
* Creating a Seperate IV_Index initialization and updating state
distinct from the current values sent and received in SNBs.
If a restart occured during an IV Update procedure (96 hours long)
the IVU bit got lost, and Sequence number resetting was not done
correctly.
* Assuring that all Nodes handled by daemon receive each incoming
beacon. SNB handling previously stopped after the first node
successfuly handled it, although the SNB may be valid for many local
nodes.
Diffstat (limited to 'mesh/mesh-config-json.c')
-rw-r--r-- | mesh/mesh-config-json.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mesh/mesh-config-json.c b/mesh/mesh-config-json.c index 198fef518..df58cbd7d 100644 --- a/mesh/mesh-config-json.c +++ b/mesh/mesh-config-json.c @@ -2057,7 +2057,8 @@ bool mesh_config_write_seq_number(struct mesh_config *cfg, uint32_t seq, return mesh_config_save(cfg, true, NULL, NULL); } - if (get_int(cfg->jnode, "sequenceNumber", &value)) + /* If resetting seq to Zero, make sure cached value reset as well */ + if (seq && get_int(cfg->jnode, "sequenceNumber", &value)) cached = (uint32_t)value; /* |