]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: quic: adjust Rx packet type parsing
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 17 Apr 2023 13:03:51 +0000 (15:03 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 18 Apr 2023 14:20:47 +0000 (16:20 +0200)
commit1a5cc19cecfa84bfd0fdd7b9d5d20899cce40662
tree65b836ebedad9b5b5455861b65a1d002c7d8cf97
parent6ac0fb0f13978acfbb1d1284147e88a3328d3443
MINOR: quic: adjust Rx packet type parsing

qc_parse_hd_form() is the function used to parse the first byte of a
packet and return its type and version. Its API has been simplified with
the following changes :
* extra out paremeters are removed (long_header and version). All infos
  are now stored directly in quic_rx_packet instance
* a new dummy version is declared in quic_versions array with a 0 number
  code. This can be used to match Version negotiation packets.
* a new default packet type is defined QUIC_PACKET_TYPE_UNKNOWN to be
  used as an initial value.

Also, the function has been exported to an include file. This will be
useful to be able to reuse on quic-sock to parse the first packet of a
datagram.

This should be backported up to 2.7.
include/haproxy/quic_conn-t.h
include/haproxy/quic_conn.h
src/quic_conn.c