From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH v3 7/8] Bluetooth: ISO: Fix not updating BIS sender source address
Date: Tue, 7 Oct 2025 18:31:54 -0400 [thread overview]
Message-ID: <20251007223155.1539954-7-luiz.dentz@gmail.com> (raw)
In-Reply-To: <20251007223155.1539954-1-luiz.dentz@gmail.com>
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The source address for a BIS sender/Broadcast Source shall be updated
with the advertisement address since in case privacy is enabled it may
use an RPA rather than an identity address.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
net/bluetooth/iso.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/net/bluetooth/iso.c b/net/bluetooth/iso.c
index 3283139b3e7b..a8986c69bd19 100644
--- a/net/bluetooth/iso.c
+++ b/net/bluetooth/iso.c
@@ -2027,6 +2027,25 @@ static void iso_conn_ready(struct iso_conn *conn)
BT_DBG("conn %p", conn);
if (sk) {
+ /* Attempt to update source address in case of BIS Sender if
+ * the advertisement is using a random address.
+ */
+ if (conn->hcon->type == BIS_LINK &&
+ conn->hcon->role == HCI_ROLE_MASTER &&
+ !bacmp(&conn->hcon->dst, BDADDR_ANY)) {
+ struct hci_conn *bis = conn->hcon;
+ struct adv_info *adv;
+
+ adv = hci_find_adv_instance(bis->hdev,
+ bis->iso_qos.bcast.bis);
+ if (adv && bacmp(&adv->random_addr, BDADDR_ANY)) {
+ lock_sock(sk);
+ iso_pi(sk)->src_type = BDADDR_LE_RANDOM;
+ bacpy(&iso_pi(sk)->src, &adv->random_addr);
+ release_sock(sk);
+ }
+ }
+
iso_sock_ready(conn->sk);
} else {
hcon = conn->hcon;
--
2.51.0
next prev parent reply other threads:[~2025-10-07 22:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-07 22:31 [PATCH v3 1/8] Bluetooth: HCI: Add initial support for PAST Luiz Augusto von Dentz
2025-10-07 22:31 ` [PATCH v3 2/8] Bluetooth: hci_core: Introduce HCI_CONN_FLAG_PAST Luiz Augusto von Dentz
2025-10-07 22:31 ` [PATCH v3 3/8] Bluetooth: ISO: Add support to bind to trigger PAST Luiz Augusto von Dentz
2025-10-08 20:14 ` Pauli Virtanen
2025-10-07 22:31 ` [PATCH v3 4/8] Bluetooth: HCI: Always use the identity address when initializing a connection Luiz Augusto von Dentz
2025-10-07 22:31 ` [PATCH v3 5/8] Bluetooth: ISO: Attempt to resolve broadcast address Luiz Augusto von Dentz
2025-10-07 22:31 ` [PATCH v3 6/8] Bluetooth: MGMT: Allow use of Set Device Flags without Add Device Luiz Augusto von Dentz
2025-10-07 22:31 ` Luiz Augusto von Dentz [this message]
2025-10-07 22:31 ` [PATCH v3 8/8] Bluetooth: ISO: Fix another instance of dst_type handling Luiz Augusto von Dentz
2025-10-07 22:58 ` [v3,1/8] Bluetooth: HCI: Add initial support for PAST bluez.test.bot
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=20251007223155.1539954-7-luiz.dentz@gmail.com \
--to=luiz.dentz@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