Bluetooth: L2CAP: Make CoC depend on SMP
This is necessary in order to properly handle security errors which are part of the testing specification thus can influence qualification. Change-Id: If444e753be9196f3d5bb36cea00e332a33aa249f Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
ac844cf687
commit
d1ae81eddd
3 changed files with 2 additions and 2 deletions
|
@ -457,6 +457,7 @@ config NETWORKING_WITH_BT
|
||||||
select BLUETOOTH
|
select BLUETOOTH
|
||||||
select BLUETOOTH_PERIPHERAL
|
select BLUETOOTH_PERIPHERAL
|
||||||
select BLUETOOTH_L2CAP_DYNAMIC_CHANNEL
|
select BLUETOOTH_L2CAP_DYNAMIC_CHANNEL
|
||||||
|
select BLUETOOTH_SMP
|
||||||
default n
|
default n
|
||||||
help
|
help
|
||||||
Enable Bluetooth driver that send and receives IPv6 packets,
|
Enable Bluetooth driver that send and receives IPv6 packets,
|
||||||
|
|
|
@ -253,6 +253,7 @@ endif # BLUETOOTH_SMP
|
||||||
|
|
||||||
config BLUETOOTH_L2CAP_DYNAMIC_CHANNEL
|
config BLUETOOTH_L2CAP_DYNAMIC_CHANNEL
|
||||||
bool "L2CAP Dynamic Channel support"
|
bool "L2CAP Dynamic Channel support"
|
||||||
|
depends on BLUETOOTH_SMP
|
||||||
default n
|
default n
|
||||||
help
|
help
|
||||||
This option enables support for LE Connection oriented Channels,
|
This option enables support for LE Connection oriented Channels,
|
||||||
|
|
|
@ -608,13 +608,11 @@ static void le_conn_req(struct bt_l2cap *l2cap, uint8_t ident,
|
||||||
goto rsp;
|
goto rsp;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_BLUETOOTH_SMP)
|
|
||||||
/* Check if connection has minimum required security level */
|
/* Check if connection has minimum required security level */
|
||||||
if (conn->sec_level < server->sec_level) {
|
if (conn->sec_level < server->sec_level) {
|
||||||
rsp->result = sys_cpu_to_le16(BT_L2CAP_ERR_AUTHENTICATION);
|
rsp->result = sys_cpu_to_le16(BT_L2CAP_ERR_AUTHENTICATION);
|
||||||
goto rsp;
|
goto rsp;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_BLUETOOTH_SMP */
|
|
||||||
|
|
||||||
if (!L2CAP_LE_CID_IS_DYN(scid)) {
|
if (!L2CAP_LE_CID_IS_DYN(scid)) {
|
||||||
rsp->result = sys_cpu_to_le16(BT_L2CAP_ERR_INVALID_SCID);
|
rsp->result = sys_cpu_to_le16(BT_L2CAP_ERR_INVALID_SCID);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue