Skip to contentSkip to conversation

Bluetooth: Don't take actions on blocked devices when scanning

PATCH In review [email protected] 2 participants 2 messages Jul 4, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Bluetooth: Don't take actions on blocked devices when scanning

From: Johan Hedberg <[email protected]>

If a found device is marked as blocked while doing passive LE scanning, neither report it nor try to connect to it.

---
 net/bluetooth/hci_event.c | 4 ++++
 1 file changed, 4 insertions(+)
net/bluetooth/hci_event.c +4 -0
index c380545f1e92..27c1d2edeebe 100644
@@ -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;
Signature · 1 line
1.9.3
maintainer
#1 lore raw

Hi Johan,

Quoted 7 lines

If a found device is marked as blocked while doing passive LE scanning, neither report it nor try to connect to it.

---
net/bluetooth/hci_event.c | 4 ++++

1 file changed, 4 insertions(+)

patch has been applied to bluetooth-next tree.

Regards

Marcel