From: Amaury Denoyelle Date: Wed, 1 Apr 2026 11:10:21 +0000 (+0200) Subject: BUG/MINOR: quic: fix documentation for transport params decoding X-Git-Tag: v3.4-dev8~44 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b72bfedd683e3858b4edb54d2defe9dbd9be6512;p=thirdparty%2Fhaproxy.git BUG/MINOR: quic: fix documentation for transport params decoding The documentation for functions related to transport parameters decoding is unclear or sometimes completely wrong on the meaning of the argument. It must be set to reflect the origin of the parameters, contrary to what was implied in function comments. Fix this by rewriting comments related to this argument. This should prevent to make any mistake in the future. This is purely a documentation fix. However, it could be useful to backport it up to 2.6. --- diff --git a/src/quic_tp.c b/src/quic_tp.c index 309411af0..ec2e9d5df 100644 --- a/src/quic_tp.c +++ b/src/quic_tp.c @@ -256,9 +256,8 @@ static int quic_transport_param_dec_version_info(struct tp_version_information * } /* Decode into

struct a transport parameter found in <*buf> buffer with - * as type and as length, depending on boolean value which - * must be set to 1 for a server (haproxy listener) or 0 for a client (connection - * to an haproxy server). + * as type and as length. The boolean argument must be + * set according to the origin of the parameters. */ static enum quic_tp_dec_err quic_transport_param_decode(struct quic_transport_params *p, int server, @@ -675,9 +674,8 @@ int quic_transport_params_encode(unsigned char *buf, return pos - head; } -/* Decode transport parameters found in buffer into

, depending on - * boolean value which must be set to 1 for a server (haproxy listener) - * or 0 for a client (connection to a haproxy server). +/* Decode transport parameters found in buffer into

. The boolean + * argument must be set according to the origin of the parameters. * Returns 1 if succeeded, 0 if not. */ static enum quic_tp_dec_err @@ -729,9 +727,10 @@ quic_transport_params_decode(struct quic_transport_params *p, int server, return QUIC_TP_DEC_ERR_NONE; } -/* Store transport parameters found in buffer into QUIC connection - * depending on value which must be 1 for a server (haproxy listener) - * or 0 for a client (connection to a haproxy server). +/* Store transport parameters found in buffer into QUIC connection. + * The boolean argument must be set according to the origin of the + * parameters. + * * Note that peer transport parameters are stored in the TX part of the connection: * they are used to send packets to the peer with its transport parameters as * limitations.