summaryrefslogtreecommitdiff
path: root/net/bluetooth/hci_event.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2014-07-04 16:15:49 +0300
committerMarcel Holtmann <marcel@holtmann.org>2014-07-04 15:54:29 +0200
commit99a6768e0e55d19a47934ccd653ff0f9b3236401 (patch)
treee2ddfa05e72e0d45c7fe468092dd2cd49b53e881 /net/bluetooth/hci_event.c
parent46ebeb26cd976b9902d074c9a51f091a5744f9f3 (diff)
Bluetooth: Don't take actions on blocked devices when scanning
If a found device is marked as blocked while doing passive LE scanning, neither report it nor try to connect to it. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r--net/bluetooth/hci_event.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index c380545f1e92..27c1d2edeebe 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -4239,6 +4239,10 @@ static void process_adv_report(struct hci_dev *hdev, u8 type, bdaddr_t *bdaddr,
bdaddr_type = irk->addr_type;
}
+ /* Ignore if the device is blocked */
+ if (hci_blacklist_lookup(hdev, bdaddr, bdaddr_type))
+ return;
+
if (type == LE_ADV_IND || type == LE_ADV_DIRECT_IND) {
if (check_pending_le_conn(hdev, bdaddr, bdaddr_type))
return;