OSDN Git Service

Do not remove device security record on LMP timeout
authorAndre Eisenbach <eisenbach@google.com>
Thu, 13 Apr 2017 21:49:36 +0000 (14:49 -0700)
committerAndre Eisenbach <eisenbach@google.com>
Fri, 14 Apr 2017 06:09:22 +0000 (23:09 -0700)
commit4f484079fd27effce2675ed38f3cdf88da42ab04
tree0fa2bd1a17276e33cafa3e9b75204422323d8b0b
parent81eba70e0d49469c8c3d2878a88575e86a350654
Do not remove device security record on LMP timeout

If an LMP timeout is encountered in the middle of authentication, the
link key is removed from the controller (but not from NVRAM). This can
result in a follow up connction triggering a LINK_KEY_MISSING reply,
which in turn can cause a remote device to initiate pairing which will
then finally remove the link key stored in NVRAM as well.

This change prevents the link key from being removed from the Bluetooth
controller in case of a timeout during link authentication.

Bug: 36798442
Test: manual
Change-Id: Ic89a16b45756e3d40b2e374c645c8f245f6ce3fc
(cherry picked from commit 1f5ec7304fc4e297f9f9868b5bd9382c2a26c8cc)
bta/dm/bta_dm_act.cc
btif/src/btif_dm.cc