Commit edceec87 authored by Marcel Holtmann's avatar Marcel Holtmann Committed by Marcel Holtmann

[Bluetooth] Fix L2CAP binding to local address

In the function l2cap_connect_ind() we compare the bounded
address with the address of an incoming connection, but we
have to compare it with the local address of the HCI device.
parent 55ce9e7c
......@@ -1788,7 +1788,7 @@ static int l2cap_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type)
if (sk->state != BT_LISTEN)
continue;
if (!bacmp(&bt_sk(sk)->src, bdaddr)) {
if (!bacmp(&bt_sk(sk)->src, &hdev->bdaddr)) {
lm1 |= (HCI_LM_ACCEPT | l2cap_pi(sk)->link_mode);
exact++;
} else if (!bacmp(&bt_sk(sk)->src, BDADDR_ANY))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment