From 70f1df22a4f4677d4cfe22c7e1e592321b566c4f Mon Sep 17 00:00:00 2001 From: Jaganath Kanakkassery Date: Thu, 3 Nov 2016 19:28:02 +0530 Subject: [PATCH] Bluetooth: RFCOMM: Set sec_level to LOW during L2CAP register Security will be elevated based on the DLC required level during connection. Change-Id: I0b63885582f34a5689f7bc8081c1f9f011b2325f Signed-off-by: Jaganath Kanakkassery --- subsys/bluetooth/host/rfcomm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/subsys/bluetooth/host/rfcomm.c b/subsys/bluetooth/host/rfcomm.c index 408ed9f595a..1122510f068 100644 --- a/subsys/bluetooth/host/rfcomm.c +++ b/subsys/bluetooth/host/rfcomm.c @@ -1007,8 +1007,9 @@ static int rfcomm_accept(struct bt_conn *conn, struct bt_l2cap_chan **chan) void bt_rfcomm_init(void) { static struct bt_l2cap_server server = { - .psm = BT_L2CAP_PSM_RFCOMM, - .accept = rfcomm_accept, + .psm = BT_L2CAP_PSM_RFCOMM, + .accept = rfcomm_accept, + .sec_level = BT_SECURITY_LOW, }; net_buf_pool_init(rfcomm_session_pool);