]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: quic: Handshake I/O handler rework.
authorFrédéric Lécaille <flecaille@haproxy.com>
Thu, 13 Jul 2023 12:44:04 +0000 (14:44 +0200)
committerFrédéric Lécaille <flecaille@haproxy.com>
Fri, 21 Jul 2023 12:30:35 +0000 (14:30 +0200)
commit6d027c2edbf8b81467a18b4b99e383bf202e2431
treec816a01d1d4ef436b01820f3759e94cfd476756a
parent367ece4add072ef5cac2391415f044ba3b87469b
MEDIUM: quic: Handshake I/O handler rework.

quic_conn_io_cb() is the I/O handler used during the handshakes. It called
qc_prep_pkts() after having called qc_treat_rx_pkts() to prepare datagrams
after having parsed incoming ones with branches to "next_level" label depending
on the connection state and if the current TLS session was a 0-RTT session
or not. The code doing that was ugly and not easy to maintain.

As qc_prep_pkts() is able to handle all the encryption levels available for
a connection, there is no need to keep this code.

After simplification, for now on, to be short, quic_conn_io_cb() called only one
time qc_prep_pkts() after having called qc_treat_rx_pkts().

Furthermore, there are more chances that this I/O handler could be reused for
the haproxy server side connections.
src/quic_conn.c