summaryrefslogtreecommitdiffstats
path: root/net/quic/quic_packet_generator.h
diff options
context:
space:
mode:
authorrtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-26 14:51:56 +0000
committerrtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-26 14:51:56 +0000
commit48878097c79f472be47c9c518bd07041762af6c1 (patch)
treeb3b8f0adb99d2bf9356917c4ca9fed4daa2f3a9a /net/quic/quic_packet_generator.h
parent581ec2af841f60e4a36fdee26013c2ada2933c70 (diff)
downloadchromium_src-48878097c79f472be47c9c518bd07041762af6c1.zip
chromium_src-48878097c79f472be47c9c518bd07041762af6c1.tar.gz
chromium_src-48878097c79f472be47c9c518bd07041762af6c1.tar.bz2
Land Recent QUIC changes.
Implemented RTO calculation for TCP sender. Merge internal change: 49182038 Introduce a different proof-demand type for ECDSA certs. In cl/48309237, wtc enabled ECDSA certificates for QUIC. However, Windows XP can't cope with them so we mustn't return ECDSA certs to those clients. The value of ECDSA over RSA in QUIC is much less than in TLS because the server doesn't need to sign every connection. However, they are likely to be ~192 bytes smaller, which might be useful. This change disables ECDSA certificates for the <X509> tag and introduces a new <X59E> tag by which the client can advertise that it supports ECDSA certificates. Merge internal change: 49170028 Added whitespace. Merge internal change: 49130502 QUIC: check that encryption sequence numbers always increase. Since sequence number reuse is causes the end of the world, check that it never happens. This makes me feel more warm and fuzzy. Merge internal change: 49113162 QUIC: Send larger client hellos when hoping for certificates. With cl/49050453, larger client hellos can get larger rejection messages. This change causes the client to send larger client hellos when it's likely that we'll be getting certificates. In the event that the certificates fit in the larger space, but not the smaller one, this saves a round trip. Merge internal change: 49109243 QUIC: allow larger ClientHellos to get larger certificate chains. At the moment we hope that the certificate chain compression gets the certs down to under 400 bytes and then we feel ok about sending them in a reply to an unverified source address. But since we're switching to 2K certs that's basically hopeless: the leaf certificate will have two, uncompressable blobs in it: the public key and the signature and, for 2K, they are 256 bytes each. This change allows a client to send a client hello with more padding and get a larger reply to an unverified source address. What we don't want is to become a DDoS amplifier so we make the attacker work in order to get more from us. Merge internal change: 49050453 QUIC: Update the common certificate set with GIAG2. This doesn't break the protocol, but it does mean that clients with the old certificate set won't be able to elide any certificates. But since Chrome isn't working with QUIC HTTPS yet anyway, that's not a problem. Merge internal change: 49050091 Modify QuicStreamSequencer::OnStreamFrame to not call ProcessRawData with zero length data. Fixes http://crbug.com/257041 Merge internal change: 48912969 BUG=257041 Change ReliableQuicStream::OnStreamFrame to simply delegate fin handling to the QuicStreamSequencer. Merge internal change: 48900554 Spliting QuicPacketEntropyManager into QuicReceivedEntropyManager and QuicSentEntropyManager, in preparation for a larger refactor to create a ReceivedPacketManager. Merge internal change: 48860732 Add a test to recreate the invalid ack created when an Ack is sent immediately in response to a received ack, but the incoming ack's corresponding headers, and hence packet entropy, has not been processed. Merge internal change: 48848920 Aggregate ACK and Feedback frames properly. Existing code tried to pack acks with feedback info, and regulate transmission of control packets. There was a bug where it sometimes didn't pack together an ack with a feedback frame (specifically when we were blocked from sending non-retransmittable data). There was a second bug wherein a control frame might be prematurely serialized, when it could *not* be sent immediately. Specifically when the control frame was the first frame in a packet, and non-retransmittable data could be sent, the control frame could be errantly added. We now consistently aggregate ack frames with feedback frames in a single packet whenever the coalescing won't delay the sending of the just-in-time calculated frames. We now also avoid adding a control frame into a packet unless we are sure it can be sent immediately (so that we don't block or delay future ack and feedback transmission). The CL includes updates to tests so that they fail with the old code, but pass with the new code, as well as a bunch of additions to comments. This CL is based on the Chromium CL 17341005 (which is not landing until its merge time comes around), and resolves chromium bug 256116. FIXED=9502307 Merge internal change: 48841932 BUG=256116 Add logging to the QUIC write path. merge chromium CL: 17518002 Merge internal change: 48811324 Most of the changes were already in chromium except for comment change. Fix broken test (opt mode) in cl/48802264. Merge internal change: 48806857 Demote LOG(ERROR) to DLOG(INFO) when a client sends a packet with unsupported version. This should not be considered an ERROR server-side, as a client is free to send us whatever they like. We deal with it by sending a version negotiation packet and all is well. Updated tests, and added some comments. Merge internal change: 48802264 Added time_wait_list_manager helper method to QuicDispatcher. Merge internal change: 48787571 QUIC: encode the cluster in the first four bytes of the orbit value. In order to try and measure, in Chrome, when we might have saved a round-trip with a cluster-wide strike-register we need to know when we hit another server in the same cluster. We could do that by IP address somewhat, but it's a little complex and there's the /8 vs /5 between core and .... This change causes the first four bytes of the orbit to include a hash of the cluster (or ... rack name) so that we can easily track this in Chrome. Merge internal change: 48784059 Fix a bug in ReliableQuicStream::OnDecompressorAvailable where a decompression failure would result in an infinite loop. Merge internal change: 48696905 patch from issue 20054002 Enabling ChannelId for QUIC, and passing the ChannelId header to google backends if we're using it. Not flag protected as we're not doing secure-quic in prod yet. Merge internal change: 48645878 * Removed QuicTag kQuicVersion1 * Replaced this with enum QuicVersion, which currently has QUIC_VERSION_6 and QUIC_VERSION_7 * End to end tests are run with both versions * Framer tests are run with both versions * QuicConnection now takes a QuicVersion parameter * TimeWaitListManager now stores QuicVersion in the GUID map and sets the framer version appropriately using this before sending reset Merge internal change: 48634592 R=rch@chromium.org Review URL: https://chromiumcodereview.appspot.com/20227003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213914 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/quic/quic_packet_generator.h')
-rw-r--r--net/quic/quic_packet_generator.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/net/quic/quic_packet_generator.h b/net/quic/quic_packet_generator.h
index f47a540..ab0dbe2 100644
--- a/net/quic/quic_packet_generator.h
+++ b/net/quic/quic_packet_generator.h
@@ -108,7 +108,13 @@ class NET_EXPORT_PRIVATE QuicPacketGenerator {
private:
void SendQueuedFrames();
+ // Test to see if we have pending ack, feedback, or control frames.
bool HasPendingFrames() const;
+ // Test to see if the addition of a pending frame (which might be
+ // retransmittable) would still allow the resulting packet to be sent now.
+ bool CanSendWithNextPendingFrameAddition() const;
+ // Add exactly one pending frame, preferring ack over feedback over control
+ // frames.
bool AddNextPendingFrame();
bool AddFrame(const QuicFrame& frame);
@@ -120,10 +126,15 @@ class NET_EXPORT_PRIVATE QuicPacketGenerator {
QuicPacketCreator* packet_creator_;
QuicFrames queued_control_frames_;
bool should_flush_;
+ // Flags to indicate the need for just-in-time construction of a frame.
bool should_send_ack_;
+ bool should_send_feedback_;
+ // If we put a non-retransmittable frame (namley ack or feedback frame) in
+ // this packet, then we have to hold a reference to it until we flush (and
+ // serialize it). Retransmittable frames are referenced elsewhere so that they
+ // can later be (optionally) retransmitted.
scoped_ptr<QuicAckFrame> pending_ack_frame_;
scoped_ptr<QuicCongestionFeedbackFrame> pending_feedback_frame_;
- bool should_send_feedback_;
DISALLOW_COPY_AND_ASSIGN(QuicPacketGenerator);
};