]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: mux-h2: CONTINUATION in closed state must always return GOAWAY
authorWilly Tarreau <w@1wt.eu>
Thu, 24 Jan 2019 08:36:53 +0000 (09:36 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 24 Jan 2019 14:27:06 +0000 (15:27 +0100)
Since we now support CONTINUATION frames, we must take care of properly
aborting the connection when they are sent on a closed stream. By default
we'd get a stream error which is not sufficient since the compression
context is modified and unrecoverable.

More info in this discussion :

   https://mailarchive.ietf.org/arch/msg/httpbisa/azZ1jiOkvM3xrpH4jX-Q72KoH00

This needs to be backported to 1.9 and possibly to 1.8 (less important there).

src/mux_h2.c

index 4e128d038845528f7a1710a11df57a5a77c89ec8..0a8238dd8cb55e43d3f6421e6982a6c59d54fa9f 100644 (file)
@@ -2270,7 +2270,7 @@ static void h2_process_demux(struct h2c *h2c)
                 * Some frames have to be silently ignored as well.
                 */
                if (h2s->st == H2_SS_CLOSED && h2c->dsi) {
-                       if (h2c->dft == H2_FT_HEADERS || h2c->dft == H2_FT_PUSH_PROMISE) {
+                       if (h2_ft_bit(h2c->dft) & H2_FT_HDR_MASK) {
                                /* #5.1.1: The identifier of a newly
                                 * established stream MUST be numerically
                                 * greater than all streams that the initiating