Commit c630100
http2: discard more frames after GOAWAY
After sending a GOAWAY with NO_ERROR, we should discard all frames
for streams with larger identifiers than the last stream identifier
in the GOAWAY frame. We weren't discarding RST_STREAM frames, which
could cause us to incorrectly detect a protocol error when handling
a RST_STREAM for a discarded stream.
Hoist post-GOAWAY frame discarding higher in the loop rather than
handling it on a per-frame-type basis.
We are also supposed to count discarded DATA frames against
connection-level flow control, possibly sending WINDOW_UPDATE
messages to return the flow control. We weren't doing this;
this is now fixed.
Fixes golang/go#55846
Change-Id: I7603a529c00b8637e648eee9cc4608fb5fa5199b
Reviewed-on: https://go-review.googlesource.com/c/net/+/434909
Reviewed-by: Heschi Kreinick <[email protected]>
Run-TryBot: Damien Neil <[email protected]>
Auto-Submit: Damien Neil <[email protected]>
Reviewed-by: Brad Fitzpatrick <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Reviewed-by: LI ZHEN <[email protected]>
Reviewed-by: Antonio Ojea <[email protected]>1 parent 0c1aede commit c630100
2 files changed
+52
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1459 | 1459 | | |
1460 | 1460 | | |
1461 | 1461 | | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
1462 | 1478 | | |
1463 | 1479 | | |
1464 | 1480 | | |
| |||
1501 | 1517 | | |
1502 | 1518 | | |
1503 | 1519 | | |
1504 | | - | |
1505 | | - | |
1506 | | - | |
1507 | 1520 | | |
1508 | 1521 | | |
1509 | 1522 | | |
| |||
1686 | 1699 | | |
1687 | 1700 | | |
1688 | 1701 | | |
1689 | | - | |
1690 | | - | |
1691 | | - | |
1692 | | - | |
1693 | | - | |
1694 | | - | |
1695 | | - | |
1696 | | - | |
1697 | | - | |
1698 | | - | |
1699 | 1702 | | |
1700 | 1703 | | |
1701 | 1704 | | |
| |||
1847 | 1850 | | |
1848 | 1851 | | |
1849 | 1852 | | |
1850 | | - | |
1851 | | - | |
1852 | | - | |
1853 | | - | |
1854 | 1853 | | |
1855 | 1854 | | |
1856 | 1855 | | |
| |||
2021 | 2020 | | |
2022 | 2021 | | |
2023 | 2022 | | |
2024 | | - | |
2025 | | - | |
2026 | | - | |
2027 | 2023 | | |
2028 | 2024 | | |
2029 | 2025 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3994 | 3994 | | |
3995 | 3995 | | |
3996 | 3996 | | |
3997 | | - | |
3998 | 3997 | | |
3999 | 3998 | | |
4000 | 3999 | | |
4001 | 4000 | | |
4002 | 4001 | | |
4003 | 4002 | | |
4004 | 4003 | | |
| 4004 | + | |
4005 | 4005 | | |
4006 | 4006 | | |
4007 | 4007 | | |
| |||
4010 | 4010 | | |
4011 | 4011 | | |
4012 | 4012 | | |
| 4013 | + | |
4013 | 4014 | | |
4014 | 4015 | | |
4015 | 4016 | | |
| |||
4021 | 4022 | | |
4022 | 4023 | | |
4023 | 4024 | | |
4024 | | - | |
4025 | 4025 | | |
4026 | 4026 | | |
4027 | 4027 | | |
| 4028 | + | |
| 4029 | + | |
| 4030 | + | |
| 4031 | + | |
| 4032 | + | |
| 4033 | + | |
| 4034 | + | |
| 4035 | + | |
| 4036 | + | |
| 4037 | + | |
| 4038 | + | |
| 4039 | + | |
| 4040 | + | |
| 4041 | + | |
| 4042 | + | |
| 4043 | + | |
| 4044 | + | |
| 4045 | + | |
| 4046 | + | |
| 4047 | + | |
4028 | 4048 | | |
4029 | 4049 | | |
4030 | 4050 | | |
| |||
4039 | 4059 | | |
4040 | 4060 | | |
4041 | 4061 | | |
| 4062 | + | |
| 4063 | + | |
| 4064 | + | |
| 4065 | + | |
| 4066 | + | |
| 4067 | + | |
| 4068 | + | |
| 4069 | + | |
| 4070 | + | |
| 4071 | + | |
| 4072 | + | |
4042 | 4073 | | |
4043 | 4074 | | |
4044 | 4075 | | |
| |||
4049 | 4080 | | |
4050 | 4081 | | |
4051 | 4082 | | |
| 4083 | + | |
| 4084 | + | |
| 4085 | + | |
4052 | 4086 | | |
4053 | 4087 | | |
4054 | 4088 | | |
| |||
0 commit comments