Linux bluetooth development
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Johan Hedberg <johan.hedberg@gmail.com>
Cc: "bluez mailin list (linux-bluetooth@vger.kernel.org)"
	<linux-bluetooth@vger.kernel.org>
Subject: Re: [PATCH v2 01/10] Bluetooth: Set the correct address type in Identity Address Information
Date: Sun, 23 Feb 2014 06:46:39 -0800	[thread overview]
Message-ID: <F148332F-574B-4308-9661-34AF592C84FE@holtmann.org> (raw)
In-Reply-To: <1393165438-13610-2-git-send-email-johan.hedberg@gmail.com>

Hi Johan,

> The SMP Identity Address Information PDU contains our Identity Address.
> The address type can either be static random or public and it is tracked
> in the hdev->own_address_type variable.
> 
> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
> ---
> net/bluetooth/smp.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
> index 8ef50c790b96..ce2c461d07e3 100644
> --- a/net/bluetooth/smp.c
> +++ b/net/bluetooth/smp.c
> @@ -1196,8 +1196,7 @@ int smp_distribute_keys(struct l2cap_conn *conn, __u8 force)
> 
> 		smp_send_cmd(conn, SMP_CMD_IDENT_INFO, sizeof(idinfo), &idinfo);
> 
> -		/* Just public address */
> -		memset(&addrinfo, 0, sizeof(addrinfo));
> +		addrinfo.addr_type = hdev->own_addr_type;
> 		bacpy(&addrinfo.bdaddr, &hcon->src);

why not use hcon->src_type here. Otherwise you have to track the difference between when the public address is used vs the static address and force_static_address debugfs.

Regards

Marcel


  reply	other threads:[~2014-02-23 14:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-23 14:23 [PATCH v2 00/10] LE Privacy support johan.hedberg
2014-02-23 14:23 ` [PATCH v2 01/10] Bluetooth: Set the correct address type in Identity Address Information johan.hedberg
2014-02-23 14:46   ` Marcel Holtmann [this message]
2014-02-23 14:23 ` [PATCH v2 02/10] Bluetooth: Add SMP function for generating RPAs johan.hedberg
2014-02-23 14:23 ` [PATCH v2 03/10] Bluetooth: Add timer for regenerating local RPA johan.hedberg
2014-02-23 14:23 ` [PATCH v2 04/10] Bluetooth: Add hci_get_own_address_type() convenience function johan.hedberg
2014-02-23 14:23 ` [PATCH v2 05/10] Bluetooth: Use hci_get_own_address_type() when connecting LE johan.hedberg
2014-02-23 14:23 ` [PATCH v2 06/10] Bluetooth: Use hci_get_own_address_type() for enabling advertising johan.hedberg
2014-02-23 14:23 ` [PATCH v2 07/10] Bluetooth: Use hci_get_own_address_type() for initiating LE scan johan.hedberg
2014-02-23 14:23 ` [PATCH v2 08/10] Bluetooth: Don't write static address during power on johan.hedberg
2014-02-23 14:23 ` [PATCH v2 09/10] Bluetooth: Add debugfs entry for RPA regeneration timeout johan.hedberg
2014-02-23 14:23 ` [PATCH v2 10/10] Bluetooth: Add support for Set Privacy command johan.hedberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F148332F-574B-4308-9661-34AF592C84FE@holtmann.org \
    --to=marcel@holtmann.org \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox