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

Unified Diff: net/quic/quic_crypto_server_stream.cc

Issue 1421853006: Landing Recent QUIC changes until: Fri Oct 30 22:23:58 2015 +0000 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comments 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 d4758336d2da478e4cb11fb1742cd791eb2890d8..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,9 +109,17 @@ void QuicCryptoServerStream::FinishProcessingHandshakeMessage(
}
if (reply.tag() != kSHLO) {
+ 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.
+ session()->connection()->EnableSavingCryptoPackets();
+ }
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());
@@ -180,7 +189,7 @@ void QuicCryptoServerStream::SendServerConfigUpdate(
CryptoHandshakeMessage server_config_update_message;
if (!crypto_config_->BuildServerConfigUpdateMessage(
- previous_source_address_tokens_,
+ session()->connection()->version(), previous_source_address_tokens_,
session()->connection()->self_address().address(),
session()->connection()->peer_address().address(),
session()->connection()->clock(),
@@ -255,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