]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: quic: uniformize sending methods for handshake
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 5 Apr 2024 15:23:54 +0000 (17:23 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 10 Apr 2024 09:06:41 +0000 (11:06 +0200)
commit93f5b4c8ae0e91acb890afced89fc0fcb9fabe26
treedfbf66b1cdb948b0250c5807d4bea3eb73461723
parent44eec848e84cc2533f9b412950e297771979d9e1
MINOR: quic: uniformize sending methods for handshake

Emission of packets during handshakes was implemented via an API which
uses two alternative ways to specify the list of frames.

The first one uses a NULL list of quic_enc_level as argument for
qc_prep_hpkts(). This was an implicit method to iterate on all qels
stored in quic_conn instance, with frames already inserted in their
corresponding quic_pktns.

The second method was used for retransmission. It uses a custom local
quic_enc_level list specified by the caller as input to qc_prep_hpkts().
Frames were accessible through <retransmit> list pointers of each
quic_enc_level used in an implicit mechanism.

This commit clarifies the API by using a single common method. Now
quic_enc_level list must always be specified by the caller. As for
frames list, each qels must set its new field <send_frms> pointer to the
list of frames to send. Callers of qc_prep_hpkts() are responsible to
always clear qels send list. This prevent a single instance of
quic_enc_level to be inserted while being attached to another list.

This allows notably to clean up some unnecessary code. First,
<retransmit> list of quic_enc_level is removed as it is replaced by new
<send_frms>. Also, it's now possible to use proper list_for_each_entry()
inside qc_prep_hpkts() to loop over each qels. Internal functions for
quic_enc_level selection is now removed.
include/haproxy/quic_tls-t.h
src/quic_conn.c
src/quic_tls.c
src/quic_tx.c