Bluetooth: ISO: Fix another instance of dst_type handling
Socket dst_type cannot be directly assigned to hci_conn->type since
there domain is different which may lead to the wrong address type being
used.
Fixes: 6a5ad251b7 ("Bluetooth: ISO: Fix possible circular locking dependency")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
+7
-1
@@ -2046,7 +2046,13 @@ static void iso_conn_ready(struct iso_conn *conn)
|
||||
}
|
||||
|
||||
bacpy(&iso_pi(sk)->dst, &hcon->dst);
|
||||
iso_pi(sk)->dst_type = hcon->dst_type;
|
||||
|
||||
/* Convert from HCI to three-value type */
|
||||
if (hcon->dst_type == ADDR_LE_DEV_PUBLIC)
|
||||
iso_pi(sk)->dst_type = BDADDR_LE_PUBLIC;
|
||||
else
|
||||
iso_pi(sk)->dst_type = BDADDR_LE_RANDOM;
|
||||
|
||||
iso_pi(sk)->sync_handle = iso_pi(parent)->sync_handle;
|
||||
memcpy(iso_pi(sk)->base, iso_pi(parent)->base, iso_pi(parent)->base_len);
|
||||
iso_pi(sk)->base_len = iso_pi(parent)->base_len;
|
||||
|
||||
Reference in New Issue
Block a user