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

Unified Diff: net/quic/core/quic_crypto_server_stream.cc

Issue 2876443002: Allow customization of client address used to generate and validate source address token (Closed)
Patch Set: Created 3 years, 7 months 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_crypto_server_stream.h ('k') | net/quic/core/quic_flags_list.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_crypto_server_stream.cc
diff --git a/net/quic/core/quic_crypto_server_stream.cc b/net/quic/core/quic_crypto_server_stream.cc
index dfd0c4ac4dbed2301fe7dd53a3410b3fe98c2dbe..d45cccd90adbfc27d846accf4190597d08ec094f 100644
--- a/net/quic/core/quic_crypto_server_stream.cc
+++ b/net/quic/core/quic_crypto_server_stream.cc
@@ -161,7 +161,7 @@ void QuicCryptoServerStream::OnHandshakeMessage(
DCHECK(process_client_hello_cb_ == nullptr);
validate_client_hello_cb_ = cb.get();
crypto_config_->ValidateClientHello(
- message, session()->connection()->peer_address().host(),
+ message, GetClientAddress().host(),
session()->connection()->self_address(), version(),
session()->connection()->clock(), signed_config_, std::move(cb));
}
@@ -300,8 +300,7 @@ void QuicCryptoServerStream::SendServerConfigUpdate(
crypto_config_->BuildServerConfigUpdateMessage(
session()->connection()->version(), chlo_hash_,
previous_source_address_tokens_, session()->connection()->self_address(),
- session()->connection()->peer_address().host(),
- session()->connection()->clock(),
+ GetClientAddress().host(), session()->connection()->clock(),
session()->connection()->random_generator(), compressed_certs_cache_,
*crypto_negotiated_params_, cached_network_params,
(session()->config()->HasReceivedConnectionOptions()
@@ -433,7 +432,7 @@ void QuicCryptoServerStream::ProcessClientHello(
GenerateConnectionIdForReject(use_stateless_rejects_in_crypto_config);
crypto_config_->ProcessClientHello(
result, /*reject_only=*/false, connection->connection_id(),
- connection->self_address(), connection->peer_address(), version(),
+ connection->self_address(), GetClientAddress(), version(),
connection->supported_versions(), use_stateless_rejects_in_crypto_config,
server_designated_connection_id, connection->clock(),
connection->random_generator(), compressed_certs_cache_,
@@ -470,4 +469,8 @@ QuicConnectionId QuicCryptoServerStream::GenerateConnectionIdForReject(
session()->connection()->connection_id());
}
+const QuicSocketAddress QuicCryptoServerStream::GetClientAddress() {
+ return session()->connection()->peer_address();
+}
+
} // namespace net
« no previous file with comments | « net/quic/core/quic_crypto_server_stream.h ('k') | net/quic/core/quic_flags_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698