]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: mux-spop: Make the demux stream ID a signed integer
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 13 May 2025 16:26:25 +0000 (18:26 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 13 May 2025 17:51:40 +0000 (19:51 +0200)
The demux stream ID of a SPOP connection, used when received frames are
parsed, must be a signed integer because it is set to -1 when the SPOP
connection is initialized. It will be important for the next fix.

This patch must be backported to 3.1.

src/mux_spop.c

index c55074c241c47ca8685b8b5e5fb04dff12404fcb..fbf1fcb13dbfa4bb41d6e57d46d1b6be1beb968f 100644 (file)
@@ -31,7 +31,7 @@ struct spop_conn {
        uint32_t max_id;                     /* highest ID known on this connection, <0 before HELLO handshake */
        uint32_t flags;                      /* Connection flags: SPOP_CF_* */
 
-       uint32_t dsi;                        /* dmux stream ID (<0 = idle ) */
+       int32_t dsi;                         /* dmux stream ID (<0 = idle ) */
        uint32_t dfi;                        /* dmux frame ID (if dsi >= 0) */
        uint32_t dfl;                        /* demux frame length (if dsi >= 0) */
        uint32_t dff;                        /* demux frame flags */