Skip to content

Commit 8a2fe27

Browse files
jori-nordiccarlescufi
authored andcommitted
Bluetooth: Host: Free ACL RX fragments on disconnection
This function call frees the buffer kept by the host for reassembling L2CAP PDUs into. Without this call, the current buffer will eventually be leaked, leading to a non-functional host due to lack of RX buffers. The effect is worse when host flow control is not enabled, as the RX buffer pool is shared with events, which means communication with the controller is essentially dead. Signed-off-by: Jonathan Rico <[email protected]>
1 parent 5a4fdfb commit 8a2fe27

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

subsys/bluetooth/host/conn.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1245,6 +1245,8 @@ void bt_conn_set_state(struct bt_conn *conn, bt_conn_state_t state)
12451245
case BT_CONN_DISCONNECT_COMPLETE:
12461246
wait_for_tx_work(conn);
12471247

1248+
bt_conn_reset_rx_state(conn);
1249+
12481250
LOG_DBG("trigger disconnect work");
12491251
k_work_reschedule(&conn->deferred_work, K_NO_WAIT);
12501252

0 commit comments

Comments
 (0)