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

Unified Diff: net/quic/quic_crypto_server_stream.cc

Issue 1411223011: Simplify QUIC stateless rejects by latching the value of FLAGS_enable_quic_stateless_reject_support… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@106709176
Patch Set: Created 5 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/quic_crypto_server_stream.h ('k') | net/quic/quic_crypto_server_stream_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « net/quic/quic_crypto_server_stream.h ('k') | net/quic/quic_crypto_server_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698