diff options
author | Brian Gix <brian.gix@intel.com> | 2020-10-08 11:05:47 -0700 |
---|---|---|
committer | Brian Gix <brian.gix@gmail.com> | 2023-01-30 16:14:41 -0800 |
commit | ebb219614108b3e227b9fde2ff3fdb8ec99512f7 (patch) | |
tree | 0293ed4025e6ed368222458d3e81a69fcf04a473 /mesh/net-keys.c | |
parent | 5ba57cf85140e2087fef0e617608ee33a04c5449 (diff) | |
download | bluez-ebb219614108b3e227b9fde2ff3fdb8ec99512f7.tar.gz |
mesh: Add internal Mesh Private Beacon model
Adds recgnition that the Mesh Private Beacon model is internal
and foundational, without bindings.
Diffstat (limited to 'mesh/net-keys.c')
-rw-r--r-- | mesh/net-keys.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mesh/net-keys.c b/mesh/net-keys.c index 0ba051d79..57a9df04a 100644 --- a/mesh/net-keys.c +++ b/mesh/net-keys.c @@ -123,6 +123,7 @@ uint32_t net_key_add(const uint8_t flooding[16]) key = l_new(struct net_key, 1); memcpy(key->flooding, flooding, 16); key->ref_cnt++; + key->mpb_refresh = NET_MPB_REFRESH_DEFAULT; result = mesh_crypto_k2(flooding, p, sizeof(p), &key->nid, key->enc_key, key->prv_key); if (!result) @@ -664,6 +665,10 @@ bool net_key_beacon_refresh(uint32_t id, uint32_t ivi, bool kr, bool ivu, l_debug("Set Beacon: IVI: %8.8x, IVU: %d, KR: %d", ivi, ivu, kr); + key->ivi = ivi; + key->ivu = ivu; + key->kr = kr; + /* Propagate changes to all local nodes */ net_local_beacon(id, ivi, ivu, kr); |