]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: mux-h2: fix the offset of the pattern for the ping frame
authorWilly Tarreau <w@1wt.eu>
Tue, 29 Apr 2025 10:05:08 +0000 (12:05 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 29 Apr 2025 10:13:41 +0000 (12:13 +0200)
The ping frame's pattern must be written at offset 9 (frame header
length), not 8. This was added in 3.2 with commit 4dcfe098a6 ("MINOR:
mux-h2: prepare to support PING emission"), so no backport is needed.

src/mux_h2.c

index e739c8aee9f2bb926550195e65532533cfac2617..9bec150302a87582aaf3824b052daed14de8c972 100644 (file)
@@ -3155,7 +3155,7 @@ static int h2c_send_ping(struct h2c *h2c, int ack)
                       "\x00\x00\x00\x00" /* stream ID */, 9);
 
                /* opaque data */
-               memcpy(str + 8, "\x00\x01\x02\x03\x04\x05\x06\x07", 8);
+               memcpy(str + 9, "\x00\x01\x02\x03\x04\x05\x06\x07", 8);
        }
        else {
                if (b_data(&h2c->dbuf) < 8) {