Skip to content

Commit aee29c1

Browse files
committed
Bluetooth: ISO: Fix getname not returning broadcast fields
getname shall return iso_bc fields for both BIS_LINK and PA_LINK since the likes of bluetoothd do use the getpeername to retrieve the SID both when enumerating the broadcasters and when synchronizing. Fixes: a7bcffc ("Bluetooth: Add PA_LINK to distinguish BIG sync and PA sync connections") Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent ca88be1 commit aee29c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/bluetooth/iso.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1347,7 +1347,7 @@ static int iso_sock_getname(struct socket *sock, struct sockaddr *addr,
13471347
bacpy(&sa->iso_bdaddr, &iso_pi(sk)->dst);
13481348
sa->iso_bdaddr_type = iso_pi(sk)->dst_type;
13491349

1350-
if (hcon && hcon->type == BIS_LINK) {
1350+
if (hcon && (hcon->type == BIS_LINK || hcon->type == PA_LINK)) {
13511351
sa->iso_bc->bc_sid = iso_pi(sk)->bc_sid;
13521352
sa->iso_bc->bc_num_bis = iso_pi(sk)->bc_num_bis;
13531353
memcpy(sa->iso_bc->bc_bis, iso_pi(sk)->bc_bis,

0 commit comments

Comments
 (0)