]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: mux-h2: Check H2_SF_BODY_TUNNEL on H2S flags and not demux frame ones
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 24 May 2023 09:44:53 +0000 (11:44 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 24 May 2023 14:06:11 +0000 (16:06 +0200)
In h2c_frt_stream_new(), H2_SF_BODY_TUNNEL flags was tested on demux frame
flags (h2c->dff) instead of the h2s flags.  By chance, it is a noop test
becasue H2_SF_BODY_TUNNEL value, once converted to an int8_t, is 0.

It is a 2.8-specific issue. No backport needed.

src/mux_h2.c

index b7d2834846208002a8313e6a074d2f8803094fd2..61dc97281f4a46cf82d3246a1002faa080bbafca 100644 (file)
@@ -1570,7 +1570,7 @@ static struct h2s *h2c_frt_stream_new(struct h2c *h2c, int id, struct buffer *in
        /* The request is not finished, don't expect data from the opposite side
         * yet
         */
-       if (!(h2c->dff & (H2_F_HEADERS_END_STREAM| H2_F_DATA_END_STREAM|H2_SF_BODY_TUNNEL)))
+       if (!(h2c->dff & (H2_F_HEADERS_END_STREAM| H2_F_DATA_END_STREAM)) && !(flags & H2_SF_BODY_TUNNEL))
                se_expect_no_data(h2s->sd);
 
        /* FIXME wrong analogy between ext-connect and websocket, this need to