summaryrefslogtreecommitdiff
path: root/net/bluetooth/iso.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/bluetooth/iso.c')
-rw-r--r--net/bluetooth/iso.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/net/bluetooth/iso.c b/net/bluetooth/iso.c
index 4bce03c8a8d3..e36d24a9098b 100644
--- a/net/bluetooth/iso.c
+++ b/net/bluetooth/iso.c
@@ -2021,6 +2021,11 @@ static bool iso_match_pa_sync_flag(struct sock *sk, void *data)
return test_bit(BT_SK_PA_SYNC, &iso_pi(sk)->flags);
}
+static bool iso_match_dst(struct sock *sk, void *data)
+{
+ return !bacmp(&iso_pi(sk)->dst, (bdaddr_t *)data);
+}
+
static void iso_conn_ready(struct iso_conn *conn)
{
struct sock *parent = NULL;
@@ -2105,7 +2110,7 @@ static void iso_conn_ready(struct iso_conn *conn)
if (!parent)
parent = iso_get_sock(hdev, &hcon->src, BDADDR_ANY,
- BT_LISTEN, NULL, NULL);
+ BT_LISTEN, iso_match_dst, BDADDR_ANY);
if (!parent)
return;
@@ -2374,7 +2379,7 @@ int iso_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr, __u8 *flags)
}
} else {
sk = iso_get_sock(hdev, &hdev->bdaddr, BDADDR_ANY,
- BT_LISTEN, NULL, NULL);
+ BT_LISTEN, iso_match_dst, BDADDR_ANY);
}
done: