]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: mux-h2: always reset rcvd_s when switching to a new frame
authorWilly Tarreau <w@1wt.eu>
Tue, 6 Aug 2019 13:49:51 +0000 (15:49 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 6 Aug 2019 13:49:51 +0000 (15:49 +0200)
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.

src/mux_h2.c

index d342009e213fb903435a7fff318865fa08e9a08d..822d456d5babe33c628c7c739a29b44d9fa67e1c 100644 (file)
@@ -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;