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

Unified Diff: net/tools/quic/quic_time_wait_list_manager.h

Issue 1424653008: Make QUIC stateless rejects work in the face of packet loss by storing the SREJ packet(s) in the Qu… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@106432163
Patch Set: 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/tools/quic/quic_dispatcher.cc ('k') | net/tools/quic/quic_time_wait_list_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_time_wait_list_manager.h
diff --git a/net/tools/quic/quic_time_wait_list_manager.h b/net/tools/quic/quic_time_wait_list_manager.h
index 092f11657b7015fe5e6f2960c5edc4cebeb9e16f..e36d8662b67e0bcbfbf97a65dd24d658914f36d5 100644
--- a/net/tools/quic/quic_time_wait_list_manager.h
+++ b/net/tools/quic/quic_time_wait_list_manager.h
@@ -48,23 +48,18 @@ class QuicTimeWaitListManager : public QuicBlockedWriterInterface {
~QuicTimeWaitListManager() override;
// Adds the given connection_id to time wait state for time_wait_period_.
- // Henceforth, any packet bearing this connection_id should not be processed
- // while the connection_id remains in this list. If a non-nullptr
- // |close_packet| is provided, the TimeWaitListManager takes ownership of it
- // and sends it again when packets are received for added connection_ids. If
- // nullptr, a public reset packet is sent with the specified |version|.
- // DCHECKs that connection_id is not already on the list. "virtual" to
- // override in tests. If "connection_rejected_statelessly" is true, it means
- // that the connection was closed due to a stateless reject, and no close
- // packet is expected. Any packets that are received for connection_id will
- // be black-holed.
- // TODO(jokulik): In the future, we plan send (redundant) SREJ packets back to
- // the client in response to stray data-packets that arrive after the first
- // SREJ. This requires some new plumbing, so we black-hole for now.
- virtual void AddConnectionIdToTimeWait(QuicConnectionId connection_id,
- QuicVersion version,
- bool connection_rejected_statelessly,
- QuicEncryptedPacket* close_packet);
+ // If |termination_packets| are provided, copies of these packets will be sent
+ // when a packet with this connection ID is processed. If no termination
+ // packets are provided, then a PUBLIC_RESET will be sent with the specified
+ // |version|. Any termination packets will be move from |termination_packets|
+ // and will become owned by the manager. If |connection_rejected_statelessly|
+ // is true, it means that the connection was closed due to a stateless reject,
+ // and termination packets are expected.
+ virtual void AddConnectionIdToTimeWait(
+ QuicConnectionId connection_id,
+ QuicVersion version,
+ bool connection_rejected_statelessly,
+ std::vector<QuicEncryptedPacket*>* termination_packets);
// Returns true if the connection_id is in time wait state, false otherwise.
// Packets received for this connection_id should not lead to creation of new
@@ -151,17 +146,15 @@ class QuicTimeWaitListManager : public QuicBlockedWriterInterface {
ConnectionIdData(int num_packets_,
QuicVersion version_,
QuicTime time_added_,
- QuicEncryptedPacket* close_packet,
- bool connection_rejected_statelessly)
- : num_packets(num_packets_),
- version(version_),
- time_added(time_added_),
- close_packet(close_packet),
- connection_rejected_statelessly(connection_rejected_statelessly) {}
+ bool connection_rejected_statelessly);
+
+ ~ConnectionIdData();
+
int num_packets;
QuicVersion version;
QuicTime time_added;
- QuicEncryptedPacket* close_packet;
+ // These packets may contain CONNECTION_CLOSE frames, or SREJ messages.
+ std::vector<QuicEncryptedPacket*> termination_packets;
bool connection_rejected_statelessly;
};
« no previous file with comments | « net/tools/quic/quic_dispatcher.cc ('k') | net/tools/quic/quic_time_wait_list_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698