forked from varnishcache/varnish-cache
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
h2: Add a rate limit facility for h/2 RST handling
This adds parameters h2_rst_allowance and h2_rst_allowance_period, which govern the rate of which we allow clients to reset h/2 streams. If the limit is exceeded the connection is closed. Mitigates: varnishcache#3996
- Loading branch information
Showing
5 changed files
with
116 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
varnishtest "h2 rapid reset" | ||
|
||
barrier b1 sock 5 | ||
|
||
server s1 { | ||
rxreq | ||
txresp | ||
} -start | ||
|
||
varnish v1 -cliok "param.set feature +http2" | ||
varnish v1 -cliok "param.set debug +syncvsl" | ||
varnish v1 -cliok "param.set h2_rapid_reset_limit 3" | ||
|
||
varnish v1 -vcl+backend { | ||
import vtc; | ||
|
||
sub vcl_recv { | ||
vtc.barrier_sync("${b1_sock}"); | ||
} | ||
|
||
} -start | ||
|
||
client c1 { | ||
stream 0 { | ||
rxgoaway | ||
expect goaway.err == ENHANCE_YOUR_CALM | ||
} -start | ||
|
||
stream 1 { | ||
txreq | ||
txrst | ||
} -run | ||
stream 3 { | ||
txreq | ||
txrst | ||
} -run | ||
stream 5 { | ||
txreq | ||
txrst | ||
} -run | ||
stream 7 { | ||
txreq | ||
txrst | ||
} -run | ||
|
||
barrier b1 sync | ||
stream 0 -wait | ||
} -run | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters