diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2014-02-24 05:25:54 +0100 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2014-02-24 07:45:58 +0100 |
commit | 94b1fc92cd7cf550460ffd4bcc08c2707564aa49 (patch) | |
tree | 6288fa61c03d3139540e007ccdb2fa6c9d30dbbf /net/bluetooth/hci_conn.c | |
parent | Bluetooth: Expose current identity information in debugfs (diff) | |
download | linux-94b1fc92cd7cf550460ffd4bcc08c2707564aa49.tar.xz linux-94b1fc92cd7cf550460ffd4bcc08c2707564aa49.zip |
Bluetooth: Use unresolvable private address for active scanning
When running active scanning during LE discovery, do not reveal the own
identity to the peer devices. In case LE privacy has been enabled, then
a resolvable private address is used. If the LE privacy option is off,
then use an unresolvable private address.
The public address or static random address is never used in active
scanning anymore. This ensures that scan request are send using a
random address.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth/hci_conn.c')
-rw-r--r-- | net/bluetooth/hci_conn.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index a1efa1c62de8..3d6b1cf07d23 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c @@ -563,7 +563,10 @@ static int hci_create_le_conn(struct hci_conn *conn) memset(&cp, 0, sizeof(cp)); - err = hci_update_random_address(&req, &own_addr_type); + /* Update random address, but set require_privacy to false so + * that we never connect with an unresolvable address. + */ + err = hci_update_random_address(&req, false, &own_addr_type); if (err < 0) return err; |