]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: h2/hpack: fix emission of HPACK DTSU after settings change
authorWilly Tarreau <w@1wt.eu>
Wed, 16 Feb 2022 13:28:14 +0000 (14:28 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 16 Feb 2022 13:42:13 +0000 (14:42 +0100)
Sadly, despite particular care, commit 39a0a1e12 ("MEDIUM: h2/hpack: emit
a Dynamic Table Size Update after settings change") broke H2 when sending
DTSU. A missing negation on the flag caused the DTSU_EMITTED flag to be
lost and the DTSU to be sent again on the next stream, and possibly to
break flow control or a few other internal states.

This will have to be backported wherever the patch above was backported.

Thanks to Yves Lafon for notifying us with elements to reproduce the
issue!

src/mux_h2.c

index 3b055b44e713f5cd72fedbe531d665db5b74296e..7e50aa55ab5e10398eaa39f0939a39caf4c1db14 100644 (file)
@@ -5259,7 +5259,7 @@ static size_t h2s_frt_make_resp_headers(struct h2s *h2s, struct htx *htx)
        if (h2c->flags & H2_CF_SHTS_UPDATED) {
                /* was sent above */
                h2c->flags |= H2_CF_DTSU_EMITTED;
-               h2c->flags &= H2_CF_SHTS_UPDATED;
+               h2c->flags &= ~H2_CF_SHTS_UPDATED;
        }
 
        if (es_now) {