Index: net/quic/quic_crypto_server_stream.cc |
diff --git a/net/quic/quic_crypto_server_stream.cc b/net/quic/quic_crypto_server_stream.cc |
index b7c72c81c0fd2522145b3f9bf5a015b0ef88002d..30ba1585704067694ffea6dae2a71a5d963cf9d5 100644 |
--- a/net/quic/quic_crypto_server_stream.cc |
+++ b/net/quic/quic_crypto_server_stream.cc |
@@ -38,7 +38,8 @@ QuicCryptoServerStream::QuicCryptoServerStream( |
num_handshake_messages_(0), |
num_handshake_messages_with_server_nonces_(0), |
num_server_config_update_messages_sent_(0), |
- use_stateless_rejects_if_peer_supported_(false), |
+ use_stateless_rejects_if_peer_supported_( |
+ FLAGS_enable_quic_stateless_reject_support), |
peer_supports_stateless_rejects_(false) { |
DCHECK_EQ(Perspective::IS_SERVER, session->connection()->perspective()); |
} |
@@ -93,7 +94,7 @@ void QuicCryptoServerStream::FinishProcessingHandshakeMessage( |
DCHECK(validate_client_hello_cb_ != nullptr); |
validate_client_hello_cb_ = nullptr; |
- if (FLAGS_enable_quic_stateless_reject_support) { |
+ if (use_stateless_rejects_if_peer_supported_) { |
peer_supports_stateless_rejects_ = DoesPeerSupportStatelessRejects(message); |
} |
@@ -108,8 +109,9 @@ void QuicCryptoServerStream::FinishProcessingHandshakeMessage( |
} |
if (reply.tag() != kSHLO) { |
- if (FLAGS_enable_quic_stateless_reject_support && |
- reply.tag() == kSREJ) { |
+ if (reply.tag() == kSREJ) { |
+ DCHECK(use_stateless_rejects_if_peer_supported()); |
+ DCHECK(peer_supports_stateless_rejects()); |
// Before sending the SREJ, cause the connection to save crypto packets |
// so that they can be added to the time wait list manager and |
// retransmitted. |
@@ -117,7 +119,7 @@ void QuicCryptoServerStream::FinishProcessingHandshakeMessage( |
} |
SendHandshakeMessage(reply); |
- if (FLAGS_enable_quic_stateless_reject_support && reply.tag() == kSREJ) { |
+ if (reply.tag() == kSREJ) { |
DCHECK(use_stateless_rejects_if_peer_supported()); |
DCHECK(peer_supports_stateless_rejects()); |
DCHECK(!handshake_confirmed()); |
@@ -262,7 +264,6 @@ QuicErrorCode QuicCryptoServerStream::ProcessClientHello( |
previous_source_address_tokens_ = result.info.source_address_tokens; |
const bool use_stateless_rejects_in_crypto_config = |
- FLAGS_enable_quic_stateless_reject_support && |
use_stateless_rejects_if_peer_supported_ && |
peer_supports_stateless_rejects_; |
QuicConnection* connection = session()->connection(); |