Commit aee29c18 authored by Luiz Augusto von Dentz's avatar Luiz Augusto von Dentz
Browse files

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: a7bcffc6 ("Bluetooth: Add PA_LINK to distinguish BIG sync and PA sync connections")
Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
parent ca88be1a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1347,7 +1347,7 @@ static int iso_sock_getname(struct socket *sock, struct sockaddr *addr,
		bacpy(&sa->iso_bdaddr, &iso_pi(sk)->dst);
		sa->iso_bdaddr_type = iso_pi(sk)->dst_type;

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