]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: Fix incorrect removing of IRKs
authorJohan Hedberg <johan.hedberg@intel.com>
Tue, 26 Jan 2016 19:31:31 +0000 (14:31 -0500)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 29 Jan 2016 10:47:24 +0000 (11:47 +0100)
commit4da0f57e6c476d54210bebc010c5dbe509d2cde4
treed16e8c0b4420e75f8c496d3cf102bd80cde4ea2e
parent020d9836e9e167bc230914d727dad63d40fd0ffb
Bluetooth: Fix incorrect removing of IRKs

The commit a0bcf5fd31176f7adacbf0d1d505baf6bb9223ee was supposed to
fix handling of devices first using public addresses and then
switching to RPAs after pairing. Unfortunately it missed a couple of
key places in the code.

1. When evaluating which devices should be removed from the existing
white list we also need to consider whether we have an IRK for them or
not, i.e. a call to hci_find_irk_by_addr() is needed.

2. In smp_notify_keys() we should not be requiring the knowledge of
the RPA, but should simply keep the IRK around if the other conditions
require it.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: stable@vger.kernel.org # 4.4+
net/bluetooth/hci_request.c
net/bluetooth/smp.c