Skip to content

Commit a9a18ce

Browse files
Johan Hedbergjhedberg
authored andcommitted
Bluetooth: Mesh: Fix clearing Friend state upon reset
Not clearing the Friend state could risk invalid timers staying active, etc. Signed-off-by: Johan Hedberg <[email protected]>
1 parent 2d63f5e commit a9a18ce

File tree

1 file changed

+4
-0
lines changed
  • subsys/bluetooth/host/mesh

1 file changed

+4
-0
lines changed

subsys/bluetooth/host/mesh/main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ void bt_mesh_reset(void)
120120
bt_mesh_lpn_disable(true);
121121
}
122122

123+
if (IS_ENABLED(CONFIG_BT_MESH_FRIEND)) {
124+
bt_mesh_friend_clear_net_idx(BT_MESH_KEY_ANY);
125+
}
126+
123127
if (IS_ENABLED(CONFIG_BT_MESH_GATT_PROXY)) {
124128
bt_mesh_proxy_gatt_disable();
125129
}

0 commit comments

Comments
 (0)