]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: quic: Race issue when consuming RX packets buffer
authorFrédéric Lécaille <flecaille@haproxy.com>
Thu, 2 Dec 2021 13:46:19 +0000 (14:46 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 7 Dec 2021 14:53:56 +0000 (15:53 +0100)
commitd61bc8db5920a549d66e03ff02461ab163a2e2ee
tree5658ecc14c1aed8d03074705384e484b9b8ba994
parentf9cb3a9b0e89074537878fc5dc93d2317a8095a3
MINOR: quic: Race issue when consuming RX packets buffer

Add a null byte to the end of the RX buffer to notify the consumer there is no
more data to treat.
Modify quic_rx_packet_pool_purge() which is the function which remove the
RX packet from the buffer.
Also rename this function to quic_rx_pkts_del().
As the RX packets may be accessed by the QUIC connection handler (quic_conn_io_cb())
the function responsible of decrementing their reference counters must not
access other information than these reference counters! It was a very bad idea
to try to purge the RX buffer asap when executing this function.
include/haproxy/xprt_quic.h
src/xprt_quic.c