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

Unified Diff: net/quic/quic_client_session.cc

Issue 681713002: Update from chromium https://crrev.com/301315 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 2 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/http/transport_security_state_static.json ('k') | net/quic/quic_flags.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_client_session.cc
diff --git a/net/quic/quic_client_session.cc b/net/quic/quic_client_session.cc
index 60bcbb50b386a8ba1f588cf1dcee635df78c346f..a12b1d042199d4fb1a36b8eecdd4b5fc8b88d1a5 100644
--- a/net/quic/quic_client_session.cc
+++ b/net/quic/quic_client_session.cc
@@ -34,6 +34,9 @@ namespace {
// before allowing the requests to possibly proceed over TCP.
const int k0RttHandshakeTimeoutMs = 300;
+// IPv6 packets have an additional 20 bytes of overhead than IPv4 packets.
+const size_t kAdditionalOverheadForIPv6 = 20;
+
// Histograms for tracking down the crashes from http://crbug.com/354669
// Note: these values must be kept in sync with the corresponding values in:
// tools/metrics/histograms/histograms.xml
@@ -170,6 +173,12 @@ QuicClientSession::QuicClientSession(
going_away_(false),
weak_factory_(this) {
connection->set_debug_visitor(logger_);
+ IPEndPoint address;
+ if (socket && socket->GetLocalAddress(&address) == OK &&
+ address.GetFamily() == ADDRESS_FAMILY_IPV6) {
+ connection->set_max_packet_length(
+ connection->max_packet_length() - kAdditionalOverheadForIPv6);
+ }
}
void QuicClientSession::InitializeSession(
« no previous file with comments | « net/http/transport_security_state_static.json ('k') | net/quic/quic_flags.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698