Skip to content

Commit dd316f3

Browse files
MarekPietaanangl
authored andcommitted
[nrf fromtree] bluetooth: att: Fix L2CAP channel section order
The L2CAP channel section is sorted lexicographically. Make sure that ATT fixed channel will be placed as the last one to ensure that SMP channel is properly initialized before bt_att_connected tries to send security request. Fixes #45820 Signed-off-by: Marek Pieta <[email protected]> (cherry picked from commit 903672c)
1 parent b821eb6 commit dd316f3

File tree

1 file changed

+5
-1
lines changed
  • subsys/bluetooth/host

1 file changed

+5
-1
lines changed

subsys/bluetooth/host/att.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3085,7 +3085,11 @@ static int bt_att_accept(struct bt_conn *conn, struct bt_l2cap_chan **ch)
30853085
return 0;
30863086
}
30873087

3088-
BT_L2CAP_CHANNEL_DEFINE(att_fixed_chan, BT_L2CAP_CID_ATT, bt_att_accept, NULL);
3088+
/* The L2CAP channel section is sorted lexicographically. Make sure that ATT fixed channel will be
3089+
* placed as the last one to ensure that SMP channel is properly initialized before bt_att_connected
3090+
* tries to send security request.
3091+
*/
3092+
BT_L2CAP_CHANNEL_DEFINE(z_att_fixed_chan, BT_L2CAP_CID_ATT, bt_att_accept, NULL);
30893093

30903094
#if defined(CONFIG_BT_EATT)
30913095
static k_timeout_t credit_based_connection_delay(struct bt_conn *conn)

0 commit comments

Comments
 (0)