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

Unified Diff: net/quic/quic_stream_factory.h

Issue 107803002: Consistently suggest ephemeral port for QUIC client (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Repond to wtc review Created 7 years 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
Index: net/quic/quic_stream_factory.h
diff --git a/net/quic/quic_stream_factory.h b/net/quic/quic_stream_factory.h
index 95a3d369d9069490a27d3666c2945c2e0c46a671..35d6c9e32e70514804945d40902e92360b786d85 100644
--- a/net/quic/quic_stream_factory.h
+++ b/net/quic/quic_stream_factory.h
@@ -230,6 +230,14 @@ class NET_EXPORT_PRIVATE QuicStreamFactory
base::WeakPtrFactory<QuicStreamFactory> weak_factory_;
+ // Each profile will (probably) have a unique port_entropy_ value. This value
+ // is used to help seed a pseudo-random number generator (PortSuggester) so
+ // that we consistently (within this profile) suggest the same ephemeral port
+ // when we re-connect to any given server/port. The differences between
+ // profiles (probabalistically) prevent two profiles from colliding in their
wtc 2013/12/07 01:03:38 probabalistically => probablistically
jar (doing other things) 2013/12/07 03:12:18 Done.
+ // ephemeral port requests.
+ uint64 port_entropy_;
+
DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory);
};

Powered by Google App Engine
This is Rietveld 408576698