Skip to contentSkip to conversation

Bluetooth: Report identity address when remote device connects

PATCH In review Marcel Holtmann 2 participants 2 messages Feb 18, 2014 – Feb 19, 2014

Subsystems (2)
lore
Share & tools
lore

Marcel Holtmann

author maintainer
#0 lore raw

PATCH 1/2 Bluetooth: Report identity address when remote device connects

When the remote device has been successfully connected, report the identity address (public address or static random address).

Currently the address from the HCI_LE_Connection_Complete event is used. This was no problem so far, but since now known resolvable random addresses are converted into identities, it is important to use the identity of the connection and not the address report by HCI event.

---
 net/bluetooth/hci_event.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/bluetooth/hci_event.c +1 -1
index 49a2d4d841df..d7c709519e31 100644
@@ -3618,7 +3618,7 @@ static void hci_le_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *skb)
 	}
 
 	if (!test_and_set_bit(HCI_CONN_MGMT_CONNECTED, &conn->flags))
-		mgmt_device_connected(hdev, &ev->bdaddr, conn->type,
+		mgmt_device_connected(hdev, &conn->dst, conn->type,
 				      conn->dst_type, 0, NULL, 0, NULL);
 
 	conn->sec_level = BT_SECURITY_LOW;
Signature · 1 line
1.8.5.3
#1 lore raw

Hi Marcel,

Quoted 9 lines · Marcel Holtmann

When the remote device has been successfully connected, report the identity address (public address or static random address).

Currently the address from the HCI_LE_Connection_Complete event is used. This was no problem so far, but since now known resolvable random addresses are converted into identities, it is important to use the identity of the connection and not the address report by HCI event.

Quoted 4 lines
---
 net/bluetooth/hci_event.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Both patches have been applied to bluetooth-next. Thanks.

Johan