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, |