aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2014-06-29 06:20:15 -0400
committerMarcel Holtmann <marcel@holtmann.org>2014-07-03 11:42:49 -0400
commit6ab535a777d76a2b1e5ad03119cd0c1e5a366b06 (patch)
tree15c684de6e81a9e2d1cb35bfa870f0e27313d66e /net
parentfee746b0babf128a50ece050ee6e63003ebb5ae1 (diff)
Bluetooth: Don't use non-resolvable private address for passive scanning
The usage of non-resovlable private addresses for passive scanning is a bad idea. Passive scanning will not send any SCAN_REQ and thus using your identity address for passive scanning is not a privacy issue. It is important to use the identity address during passive scanning since that is the only way devices using direct advertising will be reported correctly by the controller. This is overlooked detail in the Bluetooth specification that current controllers are not able to report direct advertising events for other than their current address. When remote peers are using direct advertising and scanning is done with non-resolvable private address these devices will not be found. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/hci_core.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 50db0201213c..3ee2885dd9bc 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -5250,12 +5250,13 @@ void hci_req_add_le_passive_scan(struct hci_request *req)
5250 struct hci_dev *hdev = req->hdev; 5250 struct hci_dev *hdev = req->hdev;
5251 u8 own_addr_type; 5251 u8 own_addr_type;
5252 5252
5253 /* Set require_privacy to true to avoid identification from 5253 /* Set require_privacy to false since no SCAN_REQ are send
5254 * unknown peer devices. Since this is passive scanning, no 5254 * during passive scanning. Not using an unresolvable address
5255 * SCAN_REQ using the local identity should be sent. Mandating 5255 * here is important so that peer devices using direct
5256 * privacy is just an extra precaution. 5256 * advertising with our address will be correctly reported
5257 * by the controller.
5257 */ 5258 */
5258 if (hci_update_random_address(req, true, &own_addr_type)) 5259 if (hci_update_random_address(req, false, &own_addr_type))
5259 return; 5260 return;
5260 5261
5261 memset(&param_cp, 0, sizeof(param_cp)); 5262 memset(&param_cp, 0, sizeof(param_cp));