1
0
Fork 0

Bluetooth: Fix L2CAP Disconnect response for unknown CID

If we receive an L2CAP Disconnect Request for an unknown CID we should
not just silently drop it but reply with a proper Command Reject
response. This patch fixes this by ensuring that the disconnect handler
returns a proper error instead of 0 and will cause the function caller
to send the right response.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
wifi-calibration
Johan Hedberg 2013-09-16 13:05:15 +03:00 committed by Gustavo Padovan
parent 21870b523e
commit c4ea249f5f
1 changed files with 1 additions and 1 deletions

View File

@ -4206,7 +4206,7 @@ static inline int l2cap_disconnect_req(struct l2cap_conn *conn,
chan = __l2cap_get_chan_by_scid(conn, dcid);
if (!chan) {
mutex_unlock(&conn->chan_lock);
return 0;
return -EBADSLT;
}
l2cap_chan_lock(chan);