]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: quic: support multiple random CID generation for BE side
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 7 Nov 2025 10:59:24 +0000 (11:59 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 17 Nov 2025 09:11:04 +0000 (10:11 +0100)
commit035c0262203606241d0adc39f60c4381907a3df7
treef36a6e4a5b1701b74ef78e277d577bcc45a3a8a1
parent8720130cc7052ac1c5931fff8f4b49a38eab9668
MINOR: quic: support multiple random CID generation for BE side

When a new backend connection is instantiated, a CID is first randomly
generated. It will serve as the first DCID for incoming packets from the
server. Prior to this patch, if the generated CID caused a collision
with an other entries from another connection, an error is reported and
the connection cannot be allocated.

This patch improves this procedure by implementing retries when a
collision occurs. Now, at most three attemps will be performed before
giving up. This is the same procedure already performed for CIDs
instantiated after RETIRE_CONNECTION_ID frame parsing.

Along with this functional change, qc_new_conn() is refactored for
backend instantiation. The CID generation is extracted from it and the
value is passed as an argument. This is considered cleaner as the code
is more similar between frontend and backend sides.
src/quic_conn.c
src/xprt_quic.c