From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH v4 7/8] Bluetooth: ISO: Fix not updating BIS sender source address
Date: Mon, 13 Oct 2025 21:33:07 -0400 [thread overview]
Message-ID: <20251014013308.174151-7-luiz.dentz@gmail.com> (raw)
In-Reply-To: <20251014013308.174151-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 bef3136f575f..8f46a5cf22d2 100644
--- a/net/bluetooth/iso.c
+++ b/net/bluetooth/iso.c
@@ -2034,6 +2034,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-14 1:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-14 1:33 [PATCH v4 1/8] Bluetooth: HCI: Add initial support for PAST Luiz Augusto von Dentz
2025-10-14 1:33 ` [PATCH v4 2/8] Bluetooth: hci_core: Introduce HCI_CONN_FLAG_PAST Luiz Augusto von Dentz
2025-10-14 1:33 ` [PATCH v4 3/8] Bluetooth: ISO: Add support to bind to trigger PAST Luiz Augusto von Dentz
2025-10-14 1:33 ` [PATCH v4 4/8] Bluetooth: HCI: Always use the identity address when initializing a connection Luiz Augusto von Dentz
2025-10-14 1:33 ` [PATCH v4 5/8] Bluetooth: ISO: Attempt to resolve broadcast address Luiz Augusto von Dentz
2025-10-14 1:33 ` [PATCH v4 6/8] Bluetooth: MGMT: Allow use of Set Device Flags without Add Device Luiz Augusto von Dentz
2025-10-14 1:33 ` Luiz Augusto von Dentz [this message]
2025-10-14 1:33 ` [PATCH v4 8/8] Bluetooth: ISO: Fix another instance of dst_type handling Luiz Augusto von Dentz
2025-10-14 3:04 ` [v4,1/8] Bluetooth: HCI: Add initial support for PAST bluez.test.bot
2025-10-14 20:40 ` [PATCH v4 1/8] " patchwork-bot+bluetooth
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=20251014013308.174151-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