Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -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;