Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUG/MEDIUM: quic: Avoid some crashes upon TX packet allocation failures
If a TX packet cannot be allocated (by qc_build_pkt()), as it can be coalesced to another one, this leads the TX buffer to have remaining not sent prepared data. Then haproxy crashes upon a BUG_ON() triggered by the next call to qc_txb_release(). This may happen only during handshakes. To fix this, qc_build_pkt() returns a new -3 error to dected such allocation failures followed which is for now on followed by a call to qc_purge_txbuf() to send the TX prepared data and purge the TX buffer. Must be backported as far as 2.6. (cherry picked from commit 8196903) [cf: Applied on quic_conn.c instead of quic_tx.c. In addition forward declarations for qc_purge_txbuf() and qc_purge_tx_buf() were added and call to qc_purge_tx_buf() was adapted] Signed-off-by: Christopher Faulet <[email protected]>
- Loading branch information