BUG/MEDIUM: mux-h1: Fix H1C_F_ST_SILENT_SHUT value
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 16 Nov 2021 09:24:14 +0000 (10:24 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 16 Nov 2021 09:24:48 +0000 (10:24 +0100)
The commit 7700441a25 ("BUG/MINOR: mux-h1: Save shutdown mode if the
shutdown is delayed") introduced a regression during the backport process.
The H1C_F_ST_SILENT_SHUT value was not changed. However, on the 2.3 and
lowers, another H1C flag alreay have the value.

Because of this bug, H1C_F_ST_SILENT_SHUT and H1C_F_CS_SHUTDOWN shared the
same value. Mixed with some other bugs, this may lead to truncated messages.

This patch help to fix issue #1450. There is no upstream ID because the bug
only affects the 2.3 and lowers. The patch must be backported as far as 2.0.

src/mux_h1.c

index e568229..a6e9764 100644 (file)
 #define H1C_F_IN_ALLOC       0x00000010 /* mux is blocked on lack of input buffer */
 #define H1C_F_IN_FULL        0x00000020 /* mux is blocked on input buffer full */
 #define H1C_F_IN_BUSY        0x00000040 /* mux is blocked on input waiting the other side */
-/* 0x00000080 - 0x000002000 unused */
+/* 0x00000080 unused */
 
-#define H1C_F_ST_SILENT_SHUT 0x00004000 /* silent (or dirty) shutdown must be performed */
-/* 0x000008000 unused */
+#define H1C_F_ST_SILENT_SHUT 0x00000100 /* silent (or dirty) shutdown must be performed */
+/*  0x000000200 - 0x000000800 unused */
 
 /* Flags indicating the connection state */
 #define H1C_F_CS_ERROR       0x00001000 /* connection must be closed ASAP because an error occurred */