aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2022-10-31 16:10:33 -0700
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2022-11-02 16:36:59 -0700
commitf937b758a188d6fd328a81367087eddbb2fce50f (patch)
treec969b03b9f145d82296a238110a3cb466bd78a72 /net/bluetooth
parentBluetooth: L2CAP: Fix accepting connection request for invalid SPSM (diff)
downloadlinux-dev-f937b758a188d6fd328a81367087eddbb2fce50f.tar.xz
linux-dev-f937b758a188d6fd328a81367087eddbb2fce50f.zip
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 <luiz.von.dentz@intel.com> Reviewed-by: Tedd Ho-Jeong An <tedd.an@intel.com>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/l2cap_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 3eee915fb245..4d8a1d862f6b 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -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;