]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: quic: get rid of ->target quic_conn struct member
authorFrederic Lecaille <flecaille@haproxy.com>
Tue, 9 Sep 2025 09:49:33 +0000 (11:49 +0200)
committerFrederic Lecaille <flecaille@haproxy.com>
Thu, 11 Sep 2025 07:51:28 +0000 (09:51 +0200)
commit47bb15ca84d09a56f596114591457af24ea3a626
tree1d0d131a2bc1885b70dc8f6d8e5d67e5fd1d21db
parent5354c24c7609002c4daeb58e15a6057eeae367ac
MINOR: quic: get rid of ->target quic_conn struct member

The ->li (struct listener *) member of quic_conn struct was replaced by a
->target (struct obj_type *) member by this commit:

    MINOR: quic-be: get rid of ->li quic_conn member

to abstract the connection type (front or back) when implementing QUIC for the
backends. In these cases, ->target was a pointer to the ojb_type of a server
struct. This could not work with the dynamic servers contrary to the listeners
which are not dynamic.

This patch almost reverts the one mentioned above. ->target pointer to obj_type member
is replaced by ->li pointer to listener struct member. As the listener are not
dynamic, this is easy to do this. All one has to do is to replace the
objt_listener(qc->target) statement by qc->li where applicable.

For the backend connection, when needed, this is always qc->conn->target which is
used only when qc->conn is initialized. The only "problematic" case is for
quic_dgram_parse() which takes a pointer to an obj_type as third argument.
But this obj_type is only used to call quic_rx_pkt_parse(). Inside this function
it is used to access the proxy counters of the connection thanks to qc_counters().
So, this obj_type argument may be null for now on with this patch. This is the
reason why qc_counters() is modified to take this into consideration.
13 files changed:
include/haproxy/quic_conn-t.h
include/haproxy/quic_conn.h
include/haproxy/quic_sock.h
src/cli.c
src/quic_cli.c
src/quic_conn.c
src/quic_rx.c
src/quic_sock.c
src/quic_ssl.c
src/quic_tx.c
src/ssl_clienthello.c
src/ssl_ocsp.c
src/ssl_sock.c