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>
Thu, 13 Apr 2017 21:55:18 +0000 (14:55 -0700)
commit1f5ec7304fc4e297f9f9868b5bd9382c2a26c8cc
tree211718ee30c0739f8ef6fdcbdc3465b4bf0a17f4
parent5e9f56940e1865d16892639e4c9144a65547626e
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
bta/dm/bta_dm_act.cc
btif/src/btif_dm.cc