]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: quic: fix retry token check inconsistency
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 9 Nov 2023 15:44:50 +0000 (16:44 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 9 Nov 2023 15:57:37 +0000 (16:57 +0100)
commit4dee110f565cfb254c0fdbcfe4358177fda9c4e8
treee06ec669a7e69bbee13c5ebfd2a1a89401867d24
parentbb28215d9b75e75a286e0252fd8db46def497ed5
BUG/MINOR: quic: fix retry token check inconsistency

A client may send multiple INITIAL packets if ClientHello is too big for
only one. In case a Retry token is used, the client must reuse it for
every INITIAL packets.

On the haproxy server side, there was an inconsistency to handle these
packets depending on the socket mode :
* when using listener socket, token is always revalidated.
* when using connection socket, token check is bypassed. This is because
  quic_conn instance is known through its socket and thus
  quic_rx_pkt_retrieve_conn() is not necessary.

RFC 9000 does not seems to mandate retry token validation after the
first INITIAL packet per connection. Thus, this patch chooses to bypass
the check every time the connection instance is known, as this indicates
that a previous token was already validated.

This should be backported up to 2.7.
src/quic_rx.c