From 4b0e34959271c031df8f8669dee7dcc09cb89374 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Kopy=C5=9Bci=C5=84ski?= Date: Mon, 11 Oct 2021 16:24:13 +0200 Subject: [PATCH] host/mesh: Update SNB beacon before sending it Authentication value must be recalculated before sending it. This is port of 5513b86864e3ccd3de710724308e46abbcaa44af --- nimble/host/mesh/src/net.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nimble/host/mesh/src/net.c b/nimble/host/mesh/src/net.c index b8136e99b..865747b04 100644 --- a/nimble/host/mesh/src/net.c +++ b/nimble/host/mesh/src/net.c @@ -314,13 +314,13 @@ do_update: bt_mesh_friend_sec_update(BT_MESH_KEY_ANY); } + bt_mesh_subnet_foreach(bt_mesh_beacon_update); + if (IS_ENABLED(CONFIG_BT_MESH_GATT_PROXY) && bt_mesh_gatt_proxy_get() == BT_MESH_GATT_PROXY_ENABLED) { bt_mesh_proxy_beacon_send(NULL); } - bt_mesh_subnet_foreach(bt_mesh_beacon_update); - if (MYNEWT_VAL(BLE_MESH_CDB)) { bt_mesh_cdb_iv_update(iv_index, iv_update); }