]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: mux-h2: refrain from muxing during the preface
authorWilly Tarreau <w@1wt.eu>
Wed, 12 Dec 2018 07:03:58 +0000 (08:03 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 12 Dec 2018 08:23:41 +0000 (09:23 +0100)
The condition to refrain from processing the mux was insufficient as it
would only handle the outgoing connections. In essence it is not that much
of a problem since we don't have streams yet on an incoming connetion. But
it prevents waiting for the end of the preface before sending an early
WINDOW_UPDATE message, thus causing the connections to fail in this case.

This must be backported to 1.8 with a few minor adaptations.

src/mux_h2.c

index 9a2f8c7104ca5233995ec50115809510e714fa4b..390cb3062c62c7ecd93296fbcac0fb6b843bc588 100644 (file)
@@ -2353,7 +2353,7 @@ static int h2_process_mux(struct h2c *h2c)
                        h2c->st0 = H2_CS_SETTINGS1;
                }
                /* need to wait for the other side */
-               if (h2c->st0 == H2_CS_SETTINGS1)
+               if (h2c->st0 < H2_CS_FRAME_H)
                        return 1;
        }