From: Willy Tarreau Date: Tue, 6 Aug 2019 13:49:51 +0000 (+0200) Subject: BUG/MINOR: mux-h2: always reset rcvd_s when switching to a new frame X-Git-Tag: v2.1-dev2~228 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30d05f35571ebff61666e1954a696a25503ed6b0;p=thirdparty%2Fhaproxy.git BUG/MINOR: mux-h2: always reset rcvd_s when switching to a new frame In Patrick's trace it was visible that after a stream had been missed, the next stream would receive a WINDOW_UPDATE with the first one's credit added to its own. This makes sense because in case of error h2c->rcvd_s is not reset. Given that this counter is per frame, better reset it when starting to parse a new frame, it's easier and safer. This must be backported as far as 1.8. --- diff --git a/src/mux_h2.c b/src/mux_h2.c index d342009e21..822d456d5b 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -2301,6 +2301,8 @@ static void h2_process_demux(struct h2c *h2c) break; if (h2c->st0 == H2_CS_FRAME_H) { + h2c->rcvd_s = 0; + if (!h2_peek_frame_hdr(&h2c->dbuf, 0, &hdr)) break;