Bluetooth: controller: Fix data PDU leak during ctrl PDU defer

Fix a bug where in tx data PDU enqueued, while a ctrl PDU is
deferred due to Encryption setup being in progress, is
leaked causing HCI Tx Buffer Overflow crash.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
Vinayak Kariappa Chettimada
2019-09-06 14:42:38 +05:30
parent 120eba45f8
commit 671ccc4b0e

View File

@@ -10076,6 +10076,11 @@ static void ctrl_tx_sec_enqueue(struct connection *conn,
node_tx->next = conn->pkt_tx_ctrl_last->next;
conn->pkt_tx_ctrl_last->next = node_tx;
}
/* Update last pointer if ctrl added at end of tx list */
if (!node_tx->next) {
conn->pkt_tx_last = node_tx;
}
} else {
bool pause = false;