Skip to content

Commit f937b75

Browse files
committed
Bluetooth: L2CAP: Fix l2cap_global_chan_by_psm
l2cap_global_chan_by_psm shall not return fixed channels as they are not meant to be connected by (S)PSM. Signed-off-by: Luiz Augusto von Dentz <[email protected]> Reviewed-by: Tedd Ho-Jeong An <[email protected]>
1 parent 711f8c3 commit f937b75

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/bluetooth/l2cap_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1990,7 +1990,7 @@ static struct l2cap_chan *l2cap_global_chan_by_psm(int state, __le16 psm,
19901990
if (link_type == LE_LINK && c->src_type == BDADDR_BREDR)
19911991
continue;
19921992

1993-
if (c->psm == psm) {
1993+
if (c->chan_type != L2CAP_CHAN_FIXED && c->psm == psm) {
19941994
int src_match, dst_match;
19951995
int src_any, dst_any;
19961996

0 commit comments

Comments
 (0)