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)
829
829
{
830
830
struct bt_keys * conflict ;
831
831
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
+
832
837
conflict = bt_id_find_conflict (keys );
833
838
if (conflict != NULL ) {
834
839
int err ;
@@ -995,6 +1000,12 @@ static void smp_br_derive_ltk(struct bt_smp_br *smp)
995
1000
bt_addr_copy (& addr .a , & conn -> br .dst );
996
1001
addr .type = BT_ADDR_LE_PUBLIC ;
997
1002
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
+
998
1009
keys = bt_keys_get_type (BT_KEYS_LTK_P256 , conn -> id , & addr );
999
1010
if (!keys ) {
1000
1011
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