Skip to content

Commit

Permalink
Bluetooth: L2CAP: Fix l2cap_global_chan_by_psm
Browse files Browse the repository at this point in the history
[ Upstream commit f937b75 ]

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 <luiz.von.dentz@intel.com>
Reviewed-by: Tedd Ho-Jeong An <tedd.an@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Vudentz authored and gregkh committed Nov 26, 2022
1 parent 2df27ec commit b15e525
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/bluetooth/l2cap_core.c
Expand Up @@ -1990,7 +1990,7 @@ static struct l2cap_chan *l2cap_global_chan_by_psm(int state, __le16 psm,
if (link_type == LE_LINK && c->src_type == BDADDR_BREDR)
continue;

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

Expand Down

0 comments on commit b15e525

Please sign in to comment.