From: Willy Tarreau Date: Wed, 16 Feb 2022 13:28:14 +0000 (+0100) Subject: BUG/MEDIUM: h2/hpack: fix emission of HPACK DTSU after settings change X-Git-Tag: v2.6-dev2~118 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c7d85485a00bd9862ecb726ad1242c2ba724a8ca;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: h2/hpack: fix emission of HPACK DTSU after settings change 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! --- diff --git a/src/mux_h2.c b/src/mux_h2.c index 3b055b44e7..7e50aa55ab 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -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) {