diff mbox series

[BlueZ,1/2] device: Don't attempt to set auto_connect for devices using RPAs

Message ID 20230817224103.3042055-1-luiz.dentz@gmail.com
State New
Headers show
Series [BlueZ,1/2] device: Don't attempt to set auto_connect for devices using RPAs | expand

Commit Message

Luiz Augusto von Dentz Aug. 17, 2023, 10:41 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

Device using private address cannot be programmed into the auto_connect
list without them being paired and its IRK being distributed otherwise
there is no way to resolve it address and the command will fail.
---
 src/device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

patchwork-bot+bluetooth@kernel.org Aug. 18, 2023, 8:50 p.m. UTC | #1
Hello:

This series was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Thu, 17 Aug 2023 15:41:02 -0700 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> Device using private address cannot be programmed into the auto_connect
> list without them being paired and its IRK being distributed otherwise
> there is no way to resolve it address and the command will fail.
> ---
>  src/device.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
  - [BlueZ,1/2] device: Don't attempt to set auto_connect for devices using RPAs
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=cc7dbadb7236
  - [BlueZ,2/2] device: Restart temporary timer while connecting
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=0004eb06d5d9

You are awesome, thank you!
diff mbox series

Patch

diff --git a/src/device.c b/src/device.c
index e0ff0b1c1543..f6b0167bf55b 100644
--- a/src/device.c
+++ b/src/device.c
@@ -2006,7 +2006,7 @@  static void device_set_auto_connect(struct btd_device *device, gboolean enable)
 {
 	char addr[18];
 
-	if (!device || !device->le)
+	if (!device || !device->le || device_address_is_private(device))
 		return;
 
 	ba2str(&device->bdaddr, addr);