mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-15 21:59:41 -04:00
BUG/MINOR: mux-h2: properly ignore R bit in WINDOW_UPDATE increments
The window size increments are 31 bits and the topmost bit is reserved and should be ignored, however it was not masked, so a peer sending it set would emit a negative value which could actually reduce the current window instead of increasing it. Note that the window cannot reach zero as there's already a test for this, but transfers could slow down to the same speed as if an initial window of just a few bytes had been advertised. Let's just mask the reserved bit before processing. This should be backported to all stable versions.
This commit is contained in:
parent
0e231bbd7c
commit
e31640368a
1 changed files with 1 additions and 1 deletions
|
|
@ -3289,7 +3289,7 @@ static int h2c_handle_window_update(struct h2c *h2c, struct h2s *h2s)
|
|||
goto out0;
|
||||
}
|
||||
|
||||
inc = h2_get_n32(&h2c->dbuf, 0);
|
||||
inc = h2_get_n32(&h2c->dbuf, 0) & 0x7FFFFFFF;
|
||||
|
||||
if (h2c->dsi != 0) {
|
||||
/* stream window update */
|
||||
|
|
|
|||
Loading…
Reference in a new issue