aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2014-07-23 15:55:22 -0400
committerJohan Hedberg <johan.hedberg@intel.com>2014-07-23 17:37:20 -0400
commitcd4d5671385ba0c6355e013512ea6d06b1ebce02 (patch)
treea4ec0268579f2acf4871466650662c526d3ee973 /net/bluetooth
parentf4fe73ed564b1c0c375481cb7a773b03767b0216 (diff)
Bluetooth: Ignore ADV_DIRECT_IND attempts from unknown devices
Unconditionally connecting to devices sending ADV_DIRECT_IND when the controller is in CONNECTABLE mode is a feature that is not fully working. The background scanning trigger for this has been removed, but the statement allowing it to happen in case some other part triggers is still present. So remove that code part as well to avoid unwanted connections. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/hci_event.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 4c41774aa556..293dd98ae98f 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -4266,18 +4266,12 @@ static void check_pending_le_conn(struct hci_dev *hdev, bdaddr_t *addr,
4266 if (hdev->conn_hash.le_num_slave > 0) 4266 if (hdev->conn_hash.le_num_slave > 0)
4267 return; 4267 return;
4268 4268
4269 /* If we're connectable, always connect any ADV_DIRECT_IND event */
4270 if (test_bit(HCI_CONNECTABLE, &hdev->dev_flags) &&
4271 adv_type == LE_ADV_DIRECT_IND)
4272 goto connect;
4273
4274 /* If we're not connectable only connect devices that we have in 4269 /* If we're not connectable only connect devices that we have in
4275 * our pend_le_conns list. 4270 * our pend_le_conns list.
4276 */ 4271 */
4277 if (!hci_pend_le_action_lookup(&hdev->pend_le_conns, addr, addr_type)) 4272 if (!hci_pend_le_action_lookup(&hdev->pend_le_conns, addr, addr_type))
4278 return; 4273 return;
4279 4274
4280connect:
4281 conn = hci_connect_le(hdev, addr, addr_type, BT_SECURITY_LOW, 4275 conn = hci_connect_le(hdev, addr, addr_type, BT_SECURITY_LOW,
4282 HCI_LE_AUTOCONN_TIMEOUT, HCI_ROLE_MASTER); 4276 HCI_LE_AUTOCONN_TIMEOUT, HCI_ROLE_MASTER);
4283 if (!IS_ERR(conn)) 4277 if (!IS_ERR(conn))