Skip to content

Commit

Permalink
Default-enable IETF QUIC h3-29
Browse files Browse the repository at this point in the history
This CL changes the default list of supported versions to both
Q050 and h3-29. This means that users of Chrome that do not use
Finch will now have support for h3-29, and also that cronet users
also get support for it. Note that this is disabled for cronet users
that use connection migration, as we are not yet spec-compliant there.

This CL also default-disabled 0-RTT for QUIC+TLS because we haven't
yet launched it via Finch.

R=renjietang@chromium.org

Change-Id: Ic547396c55e26136468c73d3c35b60ec2066f196
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2702157
Commit-Queue: David Schinazi <dschinazi@chromium.org>
Auto-Submit: David Schinazi <dschinazi@chromium.org>
Reviewed-by: Renjie Tang <renjietang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#855084}
  • Loading branch information
David Schinazi authored and Chromium LUCI CQ committed Feb 18, 2021
1 parent 77f6387 commit 07c4661
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 4 deletions.
21 changes: 21 additions & 0 deletions components/cronet/url_request_context_config.cc
Expand Up @@ -553,6 +553,27 @@ void URLRequestContextConfig::ParseAndSetExperimentalOptions(
quic_params->ios_network_service_type = quic_ios_network_service_type;
}

// Do not enable IETF QUIC when connection migration is enabled because
// our current connection migration code does not yet fully support the
// version of connection migration in the IETF spec.
// TODO(dschinazi) remove this once we support the spec.
if ((quic_migrate_sessions_on_network_change_v2 ||
quic_migrate_idle_sessions || quic_migrate_sessions_early_v2) &&
quic_version_string.empty()) {
quic::ParsedQuicVersionVector migration_versions;
for (const quic::ParsedQuicVersion& version :
quic_params->supported_versions) {
if (!version.UsesHttp3()) {
migration_versions.push_back(version);
}
}
quic_params->supported_versions = migration_versions;
if (quic_params->supported_versions.empty()) {
quic_params->supported_versions =
quic::ParsedQuicVersionVector{quic::ParsedQuicVersion::Q050()};
}
}

} else if (it.key() == kAsyncDnsFieldTrialName) {
const base::DictionaryValue* async_dns_args = nullptr;
if (!it.value().GetAsDictionary(&async_dns_args)) {
Expand Down
2 changes: 2 additions & 0 deletions components/cronet/url_request_context_config_unittest.cc
Expand Up @@ -862,6 +862,8 @@ TEST(URLRequestContextConfigTest, SetQuicConnectionMigrationV2Options) {
quic_params->max_migrations_to_non_default_network_on_write_error);
EXPECT_EQ(
4, quic_params->max_migrations_to_non_default_network_on_path_degrading);
EXPECT_EQ(quic::ParsedQuicVersionVector{quic::ParsedQuicVersion::Q050()},
quic_params->supported_versions);
}

TEST(URLRequestContextConfigTest, SetQuicStaleDNSracing) {
Expand Down
4 changes: 2 additions & 2 deletions net/http/http_server_properties_manager_unittest.cc
Expand Up @@ -1527,7 +1527,7 @@ TEST_F(HttpServerPropertiesManagerTest, PersistAdvertisedVersionsToPref) {
"\"isolation\":[],"
"\"server\":\"https://www.google.com:80\"},"
"{\"alternative_service\":[{"
"\"advertised_versions\":[50],\"expiration\":\"9223372036854775807\","
"\"advertised_versions\":[50,73],\"expiration\":\"9223372036854775807\","
"\"host\":\"foo.google.com\",\"port\":444,\"protocol_str\":\"quic\"}],"
"\"isolation\":[],"
"\"network_stats\":{\"srtt\":42},"
Expand Down Expand Up @@ -1638,7 +1638,7 @@ TEST_F(HttpServerPropertiesManagerTest,
"\"server_id\":\"https://mail.google.com:80\","
"\"server_info\":\"quic_server_info1\"}],"
"\"servers\":["
"{\"alternative_service\":[{\"advertised_versions\":[50],"
"{\"alternative_service\":[{\"advertised_versions\":[50,73],"
"\"expiration\":\"13756212000000000\",\"port\":443,"
"\"protocol_str\":\"quic\"}],"
"\"isolation\":[],"
Expand Down
12 changes: 10 additions & 2 deletions net/quic/quic_context.h
Expand Up @@ -16,7 +16,15 @@ namespace net {
// configuration.
inline NET_EXPORT_PRIVATE quic::ParsedQuicVersionVector
DefaultSupportedQuicVersions() {
return quic::ParsedQuicVersionVector{quic::ParsedQuicVersion::Q050()};
// The ordering of this list does not matter for Chrome because it respects
// the ordering received from the server via Alt-Svc. However, cronet offers
// an addQuicHint() API which uses the first version from this list until
// it receives Alt-Svc from the server. We therefore list Q050 first here
// because there are some cronet applications which communicate with servers
// that speak Q050 but not Draft29.
// TODO(dschinazi) Move Draft29 first once those servers support it.
return quic::ParsedQuicVersionVector{quic::ParsedQuicVersion::Q050(),
quic::ParsedQuicVersion::Draft29()};
}

// Obsolete QUIC supported versions are versions that are supported by the
Expand Down Expand Up @@ -171,7 +179,7 @@ struct NET_EXPORT QuicParams {
// smoothed rtt is present.
base::TimeDelta initial_rtt_for_handshake;
// If true, QUIC with TLS will not try 0-RTT connection.
bool disable_tls_zero_rtt = false;
bool disable_tls_zero_rtt = true;
// If true, gQUIC requests will always require confirmation.
bool disable_gquic_zero_rtt = false;
// Network Service Type of the socket for iOS. Default is NET_SERVICE_TYPE_BE
Expand Down

0 comments on commit 07c4661

Please sign in to comment.