]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: quic: Add QUIC v2 draft support
authorFrédéric Lécaille <flecaille@haproxy.com>
Wed, 8 Jun 2022 17:28:36 +0000 (19:28 +0200)
committerFrédéric Lécaille <flecaille@haproxy.com>
Thu, 16 Jun 2022 12:56:24 +0000 (14:56 +0200)
commit86845c517198ffb9a767a16e12c15e909dff2fc3
tree895e71b648da7f0a79eecc0068be40a58f585155
parent83bf9ca25ad1f08be03820d4996d6b46747d7711
MEDIUM: quic: Add QUIC v2 draft support

This is becoming difficult to handle the QUIC TLS related definitions
which arrive with a QUIC version (draft or not). So, here we add
quic_version C struct which does not define only the QUIC version number,
but also the QUIC TLS definitions which depend on a QUIC version.
Modify consequently all the QUIC TLS API to reuse these definitions
through new quic_version C struct.
Implement quic_pkt_type() function which return a packet type (0 up to 3)
depending on the QUIC version number.
Stop harding the Retry packet first byte in send_retry(): this is not more
possible because the packet type field depends on the QUIC version.
Also modify quic_build_packet_long_header() for the same reason: the packet
type depends on the QUIC version.
Add a quic_version C struct member to quic_conn C struct.
Modify qc_lstnr_pkt_rcv() to set this member asap.
Remove the version member from quic_rx_packet C struct: a packet is attached
asap to a connection (or dropped) which is the unique object which should
store the QUIC version.
Modify qc_pkt_is_supported_version() to return a supported quic_version C
struct from a version number.
Add Initial salt for QUIC v2 draft (initial_salt_v2_draft).
include/haproxy/quic_tls-t.h
include/haproxy/quic_tls.h
include/haproxy/xprt_quic-t.h
include/haproxy/xprt_quic.h
src/quic_tls.c
src/xprt_quic.c