Skip to content

Commit 63887d1

Browse files
update the peer address when LTK has been found in old entry
1 parent 187ed98 commit 63887d1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

connectivity/FEATURE_BLE/source/generic/SecurityDb.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,11 @@ class SecurityDb {
190190
SecurityDistributionFlags_t* flags = get_distribution_flags(correct_handle);
191191
flags->connected = true;
192192

193+
/* update peer address */
194+
SecurityDistributionFlags_t* old_flags = get_distribution_flags(*db_handle);
195+
flags->peer_address = old_flags->peer_address;
196+
flags->peer_address_is_public = old_flags->peer_address_is_public;
197+
193198
close_entry(*db_handle, false);
194199
*db_handle = correct_handle;
195200
cb(*db_handle, keys);

0 commit comments

Comments
 (0)