From a2a2e6db7247c19025270c8a5f48a747bf009f03 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Wed, 16 Feb 2022 14:28:14 +0100 Subject: [PATCH] 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! (cherry picked from commit c7d85485a00bd9862ecb726ad1242c2ba724a8ca) Signed-off-by: Willy Tarreau --- src/mux_h2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mux_h2.c b/src/mux_h2.c index 3b055b4..7e50aa5 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) { -- 1.7.10.4