File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -829,6 +829,11 @@ static void smp_br_id_add_replace(struct bt_keys *keys)
829829{
830830 struct bt_keys * conflict ;
831831
832+ /* Check whether key has been added to resolving list. */
833+ if (keys -> state & BT_KEYS_ID_ADDED ) {
834+ bt_id_del (keys );
835+ }
836+
832837 conflict = bt_id_find_conflict (keys );
833838 if (conflict != NULL ) {
834839 int err ;
@@ -995,6 +1000,12 @@ static void smp_br_derive_ltk(struct bt_smp_br *smp)
9951000 bt_addr_copy (& addr .a , & conn -> br .dst );
9961001 addr .type = BT_ADDR_LE_PUBLIC ;
9971002
1003+ keys = bt_keys_find_addr (conn -> id , & addr );
1004+ if (keys != NULL ) {
1005+ LOG_DBG ("Clear the current keys for %s" , bt_addr_le_str (& addr ));
1006+ bt_keys_clear (keys );
1007+ }
1008+
9981009 keys = bt_keys_get_type (BT_KEYS_LTK_P256 , conn -> id , & addr );
9991010 if (!keys ) {
10001011 LOG_ERR ("Unable to get keys for %s" , bt_addr_le_str (& addr ));
You can’t perform that action at this time.
0 commit comments