Skip to content

Commit 9e1d7e1

Browse files
jhedbergholtmann
authored andcommitted
Bluetooth: Restrict blocked device check in l2cap_recv_frame to LE
BR/EDR has the connection request and connection request rejection, but LE doesn't have anything similar. We still request LE connections to blocked devices to be disconnected but it's possible that ACL data slips through before that. The check in l2cap_recv_frame really only needs to be for LE and not BR/EDR because of this. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
1 parent e30d3f5 commit 9e1d7e1

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎net/bluetooth/l2cap_core.c‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6914,7 +6914,11 @@ static void l2cap_recv_frame(struct l2cap_conn *conn, struct sk_buff *skb)
69146914
return;
69156915
}
69166916

6917-
if (hci_blacklist_lookup(hcon->hdev, &hcon->dst,
6917+
/* Since we can't actively block incoming LE connections we must
6918+
* at least ensure that we ignore incoming data from them.
6919+
*/
6920+
if (hcon->type == LE_LINK &&
6921+
hci_blacklist_lookup(hcon->hdev, &hcon->dst,
69186922
bdaddr_type(hcon, hcon->dst_type))) {
69196923
kfree_skb(skb);
69206924
return;

0 commit comments

Comments
 (0)