Parent: 77527f92529fdeb43af91a96d10d95199c53a077
Author: Jakub Pawlowski <jpawlowski@google.com>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2015-09-17 16:21:24
Tree: 4985c1b7f7fd8a75cc6986ce595754be2090e524
core/adapter: probe profiles after loading ltks When bluetoothd starts, it loads devices from storage. During this process, it loads general info. That includes loading UUIDS, and letting plugins decide whether they're interested in this device. Then load_irks call is made to load identity resolving keys into kernel. If during this process plugin decides it's interested in given device, they might register device for auto connecting by calling btd_device_add_attio_callback. This update kernel auto connect list. update_white_list inside "net/bluetooth/hci_request.c" is called. It uses hci_find_irk_by_addr to decide whether kernel know irk for given address and shall not use whitelist. However irks were not loaded yet - they're loaded by bluetoothd after all devices were initialized (and possibly added to autoconnect). Because of that, device public address is added to whitelist (instead of resolvable private address), and whitelist is used. Even worse, after call to load_irks, or after manually calling connect, device is still improperly added to whitelist and will be unable to connect (timeout will happen). To fix that bluetoothd must call load_irks before letting plugins enable autoconnect.
Diffstat
| M | src/adapter.c | | | 14 | +++++++++++- - - |
1 files changed, 11 insertions(+), 3 deletions(-)