Commit 2d3c2260 authored by Johan Hedberg's avatar Johan Hedberg Committed by Marcel Holtmann

Bluetooth: Don't try to reject failed LE connections

The check for the blacklist in hci_le_conn_complete_evt() should be when
we know that we have an actual successful connection (ev->status being
non-zero). This patch fixes this ordering.
Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 3a19b6fe
...@@ -4187,14 +4187,14 @@ static void hci_le_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *skb) ...@@ -4187,14 +4187,14 @@ static void hci_le_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *skb)
else else
addr_type = BDADDR_LE_RANDOM; addr_type = BDADDR_LE_RANDOM;
/* Drop the connection if he device is blocked */ if (ev->status) {
if (hci_bdaddr_list_lookup(&hdev->blacklist, &conn->dst, addr_type)) { hci_le_conn_failed(conn, ev->status);
hci_conn_drop(conn);
goto unlock; goto unlock;
} }
if (ev->status) { /* Drop the connection if the device is blocked */
hci_le_conn_failed(conn, ev->status); if (hci_bdaddr_list_lookup(&hdev->blacklist, &conn->dst, addr_type)) {
hci_conn_drop(conn);
goto unlock; goto unlock;
} }
......
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