]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: qc_new_conn() rework for stateless reset
authorFrédéric Lécaille <flecaille@haproxy.com>
Mon, 9 May 2022 13:42:26 +0000 (15:42 +0200)
committerFrédéric Lécaille <flecaille@haproxy.com>
Thu, 12 May 2022 15:48:35 +0000 (17:48 +0200)
commit395a64dd81ab08bf13ed9f1f822b51d253433000
tree51e225744b43e46291b56bb83f6c4b976642c3b3
parent28a1795515abed3d65a03a7f56a9acb19a75fc45
MINOR: qc_new_conn() rework for stateless reset

The stateless reset token of a connection is generated from qc_new_conn() when
allocating the first connection ID. A QUIC server can copy it into its transport
parameters to allow the peer to reset the associated connection.
This latter is not easily reachable after having returned from qc_new_conn().
We want to be able to initialize the transport parameters from this function which
has an access to all the information to do so.

Extract the code used to initialize the transport parameters from qc_lstnr_pkt_rcv()
and make it callable from qc_new_conn(). qc_lstnr_params_init() is implemented
to accomplish this task for a haproxy listener.
Modify qc_new_conn() to reduce its the number of parameters.
The source address coming from Initial packets is also copied from qc_new_conn().
src/xprt_quic.c