Commit 3af8ace6 authored by Johan Hedberg's avatar Johan Hedberg Committed by Marcel Holtmann

Bluetooth: Reject LE CoC commands when the feature is not enabled

Since LE CoC support needs to be enabled through a module option for now
we need to reject any related signaling PDUs in addition to rejecting
the creation of LE CoC sockets (which we already do).
Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent fad5fc89
......@@ -5597,6 +5597,17 @@ static inline int l2cap_le_sig_cmd(struct l2cap_conn *conn,
{
int err = 0;
if (!enable_lecoc) {
switch (cmd->code) {
case L2CAP_LE_CONN_REQ:
case L2CAP_LE_CONN_RSP:
case L2CAP_LE_CREDITS:
case L2CAP_DISCONN_REQ:
case L2CAP_DISCONN_RSP:
return -EINVAL;
}
}
switch (cmd->code) {
case L2CAP_COMMAND_REJ:
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment