Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(589)

Unified Diff: net/tools/quic/quic_dispatcher.cc

Issue 2519573002: Add a --quic_allow_chlo_buffering flag. Default value is true, no behavior change. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/core/quic_flags_list.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_dispatcher.cc
diff --git a/net/tools/quic/quic_dispatcher.cc b/net/tools/quic/quic_dispatcher.cc
index 8b3ed42121950622df140a0bd918e1273bfe8175..9c87544bfd9aec78884e9167fb10cb773d624cf2 100644
--- a/net/tools/quic/quic_dispatcher.cc
+++ b/net/tools/quic/quic_dispatcher.cc
@@ -719,8 +719,8 @@ void QuicDispatcher::ProcessChlo() {
!ShouldCreateOrBufferPacketForConnection(current_connection_id_)) {
return;
}
-
- if (FLAGS_quic_limit_num_new_sessions_per_epoll_loop &&
+ if (FLAGS_quic_allow_chlo_buffering &&
+ FLAGS_quic_limit_num_new_sessions_per_epoll_loop &&
new_sessions_allowed_per_event_loop_ <= 0) {
// Can't create new session any more. Wait till next event loop.
if (!buffered_packets_.HasChloForConnection(current_connection_id_)) {
@@ -828,11 +828,13 @@ class StatelessRejectorProcessDoneCallback
void QuicDispatcher::MaybeRejectStatelessly(QuicConnectionId connection_id,
const QuicPacketHeader& header) {
// TODO(rch): This logic should probably live completely inside the rejector.
- if (!FLAGS_quic_use_cheap_stateless_rejects ||
+ if (!FLAGS_quic_allow_chlo_buffering ||
+ !FLAGS_quic_use_cheap_stateless_rejects ||
!FLAGS_enable_quic_stateless_reject_support ||
!ShouldAttemptCheapStatelessRejection()) {
// Not use cheap stateless reject.
- if (!ChloExtractor::Extract(*current_packet_, GetSupportedVersions(),
+ if (FLAGS_quic_allow_chlo_buffering &&
+ !ChloExtractor::Extract(*current_packet_, GetSupportedVersions(),
nullptr)) {
// Buffer non-CHLO packets.
ProcessUnauthenticatedHeaderFate(kFateBuffer, connection_id,
« no previous file with comments | « net/quic/core/quic_flags_list.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698