summaryrefslogtreecommitdiffstats
path: root/net/quic/crypto/crypto_server_test.cc
Commit message (Collapse)AuthorAgeFilesLines
* Landing Recent QUIC changes until 3/18/2016 23:30 UTCjokulik2016-03-241-1/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | relnote: Add a QUIC end to end test of huge post. The test code has been added but is currently disabled, due to net_unittest timeout issues. Merge internal change: 117596033 https://codereview.chromium.org/1830253002/ relnote: Do not read rejected packet number in PUBLIC RESET packet. Merge internal change: 117595846 https://codereview.chromium.org/1834683002/ relnote: Trailers are now parsed and stored in QuicSpdyStream. Moved the TrailersWithoutOffset test to the parent QuicSpdyStreamTest. Deleted the ReceiveTrailersBeforeHeaders test entirely as it doesn't test useful behavior: it calls OnTrailingHeadersComplete directly but this is only ever called from within QuicSpdyStream (and subclasses). Switch to the new WriteOrBufferBody method. Merge internal change: 117582133 https://codereview.chromium.org/1832513004/ relnote: Move QuicSpdyClientStream::SendBody to QuicSpdyStream::WriteBody. Merge internal change: 117577200 https://codereview.chromium.org/1830043004/ relnote: Make ShouldCreate{Incoming,Outgoing}DynamicStream abstract methods in QuicSpdySession. No behavior change. Merge internal change: 117574127 https://codereview.chromium.org/1828123003/ relnote: Correctly set cmsg space for timestamping. Additionally, guard against future cmsg overflows. Not flag protected. The previous calculation for the cmsg space was too small by 8B. Merge internal change: 117568981 https://codereview.chromium.org/1828953002/ relnote: Creating a basic QUIC packet dumper Adding newlines to any logged quic frames Merge internal change: 117543172 https://codereview.chromium.org/1834593002/ relnote: Rename StreamSequencerBuffer to QuicStreamSequencerBuffer to bring it in line with other classes in //gfe/quic. No behavior change. Merge internal change: 117487896 https://codereview.chromium.org/1831723002/ relnote: Rename QuicSpdyStream::response_trailers_ to received_trailers_. No behavior change. QuicSpdyStream is used by servers and clients, received trailers could be request trailers. Merge internal change: 117483696 https://codereview.chromium.org/1822763002/ relnote: Introduces a QUIC_OVERLAPPING_STREAM_DATA error code, sent when receiving a stream frame containing data that overlaps with buffered data. Renames QUIC_INVALID_STREAM_FRAME to QUIC_EMPTY_STREAM_FRAME_NO_FIN Dan pointed out that QUIC_INVALID_STREAM_DATA is also used in the framer, making debugging the sequencer specific errors harder. Also the description of QUIC_INVALID_STREAM_DATA is that "STREAM frame data is malformed." which I don't think is true here: it's not malformed, it's just overlapping. Merge internal change: 117452324 https://codereview.chromium.org/1830063002/ relnote: Close QUIC connection if any error occurs in QuicStreamSequencerBuffer::OnStreamData. Flag protected behind default enabled --flag_quic_consolidate_onstreamframe_errors Flag protecting out of paranoia: new behavior is that if ever hit the QUIC_INTERNAL_ERROR branch in OnStreamData then we will now close the connection, whereas we did not before. Additionally a stream frame containing data which overlaps with existing data will now result in QUIC_INVALID_STREAM_DATA being sent on close, instead of QUIC_INVALID_STREAM_FRAME. Merge internal change: 117446575 https://codereview.chromium.org/1830773002/ relnote: Use SO_TIMESTAMPING for received packet timestamps. Guarded by flag_quic_use_socket_timestamp. This corrects the RTT for extremely low RTT connections (i.e. RTT < EpollServer iteration duration). This manifests as a ~1.5Gbps improvement in egress at 100% GFE CPU in the ustreamer load test, which while not indicative of reality, does bring it closer to the TCP+SSL load test behavior. In practice, this really just manages to reduce the number of calls to EpollServer::Now(). This is part of a broader set of changes to enable PACKET_RX_RING and all of the capabilities it provides, notably PACKET_TIMESTAMPING. Additionally, in QuicPacketReader's plain recvmsg path, ensure the returned server IP is valid as is done in the recvmmsg path. Merge internal change: 117434383 https://codereview.chromium.org/1828863002/ relnote: Remove QuicStreamSequencerBufferInterface that only has a single implementation. No behavior change. Merge internal change: 117397110 https://codereview.chromium.org/1823803003/ relnote: Report no client nonce as INCHOATE_HELLO_FAILURE. Merge internal change: 117371001 https://codereview.chromium.org/1820383002/ relnote: Add and plumb QuicReceivedPacket in the packet reception path. Optionally use its timestamp, guarded by gfe2_restart_flag_quic_use_socket_timestamp. This is part of a broader set of changes to enable socket-level timestamping and to enable PACKET_RX_RING with all of the capabilities it provides. Merge internal change: 117362867 https://codereview.chromium.org/1821843003/ relnote: Add QUIC 32 in which FEC related fields are removed from private flags and revived packet list are removed from ACK frame. Merge internal change: 117278937 https://codereview.chromium.org/1817223002/ relnote: rename QuicSpdyClientStream::headers to response_headers Merge internal change: 117272106 https://codereview.chromium.org/1822763002/ R=rch@chromium.org BUG= Review URL: https://codereview.chromium.org/1832953002 Cr-Commit-Position: refs/heads/master@{#383171}
* Landing Recent QUIC changes until 2016-03-15 16:26 UTCfnk2016-03-171-3/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Up to and including internal change 117245736 Fix a type casting bug in quic stream sequencer buffer. Withough this change, a QUIC frame with offset higher than 2^32 might corrupt StreamSequencerBuffer's missing frame recording logic in a 32-bit machine. Merge internal change: 117245736 https://codereview.chromium.org/1808013003/ Always use recvmmsg or recvmsg if it's available, and consolidate ReadAndDispatchPackets and ReadAndDispatchSinglePacket into a single API. Not flag protected. No functional change. Note that this does somewhat reduce the test coverage of QuicServerTest, now requiring that changes to QuicPacketReader::ReadAndDispatchSinglePacket be run on platforms that don't support recvmmsg. Merge internal change: 117245279 https://codereview.chromium.org/1810103002/ Log when client nonce is invalid. No functional change. Not flag protected. Merge internal change: 116987771 https://codereview.chromium.org/1810073002/ Pass QuicTime, QuicTime::Delta, and QuicBandwidth exclusively by value. Not flag protected. No functional change. Merge internal change: 116973081 https://codereview.chromium.org/1809123002/ Change QUIC tests that use port 80 to use 443. Merge internal change: 116970314 https://codereview.chromium.org/1808963003/ Use byte conservation instead of packet conservation in QUIC's Slow Start Large Recovery experiment. Protected by quic_sslr_byte_conservation. Merge internal change: 116964633 https://codereview.chromium.org/1814873002/ Remove the unused has_retransmittable_data argument from QuicSendAlgorithm::TimeUntilSend. No functional change. Not flag protected. Merge internal change: 116904472 https://codereview.chromium.org/1814843002/ Deprecates check_peer_address_change_after_decryption. Merge internal change: 116887287 https://codereview.chromium.org/1808613003/ Deprecate quic_respect_send_alarm2. Merge internal change: 116879870 https://codereview.chromium.org/1813513002/ Deprecate --quic_include_path_id_in_iv. Merge internal change: 116877752 https://codereview.chromium.org/1810743002/ Don't copy the QuicAckFrame into the QuicPacketGenerator. Protected by quic_dont_copy_acks. Merge internal change: 116808648 https://codereview.chromium.org/1807033002/ No longer limit QUIC's max CWND to 200 packets. Protected by quic_dont_limit_max_cwnd. This is a fix for the deprecation of a similar flag in cr/113769379. Merge internal change: 116794514 https://codereview.chromium.org/1812633002/ Remove QuicFrameList, because it's unused with the new QuicStreamSequencer. Merge internal change: 116768420 https://codereview.chromium.org/1805323003/ Add a QuicConfig option to ask the client not to attempt migration. Merge internal change: 116712124 https://codereview.chromium.org/1808513003/ Do not disable TLP by default in QuicConnection tests. Merge internal change: 116698228 https://codereview.chromium.org/1808863002/ Add a new QUIC connection option, 5RTO, which closes the QUIC connection after 5 consecutive RTOs. Protected by quic_enable_rto_timeout. Merge internal change: 116687954 https://codereview.chromium.org/1806083002/ Change QuicConnection's ScopedPacketBundler to use SEND_QUEUED_ACK instead of NO_ACK, to ensure a queued ack is always sent. Small functional change. Not flag protected. Merge internal change: 116677107 https://codereview.chromium.org/1814483002/ deprecate quic_use_rfc7539 Merge internal change: 116589902 https://codereview.chromium.org/1809703002/ Use cached compressed certs if available to reduce load of compressing certs. Flag protected by quic_use_cached_compressed_certs. Merge internal change: 116579250. https://codereview.chromium.org/1808793002/ R=rch@chromium.org BUG= Review URL: https://codereview.chromium.org/1811043002 Cr-Commit-Position: refs/heads/master@{#381795}
* Add QUIC 31 in which the server's proof covers both the static server config ↵rch2016-03-131-7/+15
| | | | | | | | | | | | as well as a hash of the client hello. This will allow the QUIC whitelist in Chrome to be removed. Merge internal change: 115261503 Review URL: https://codereview.chromium.org/1765603002 Cr-Commit-Position: refs/heads/master@{#380904}
* Landing Recent QUIC changes until 2016-03-07 19:39 UTCrjshade2016-03-111-75/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Up to, and including internal change 116570346 Add a new QUIC Ack Decimation mode that is reordering tolerant. Protected by FLAG_quic_ack_decimation2. Merge internal change: 115853846 https://codereview.chromium.org/1777293002/ Deprecating FLAG_quic_batch_writes Merge internal change: 115880164 https://codereview.chromium.org/1780913002/ Deprecate FLAG_quic_validate_stk_without_scid Merge internal change: 115885351 https://codereview.chromium.org/1780923002/ Deprecate FLAG_quic_use_new_tcp_sender Merge internal change: 115890504 https://codereview.chromium.org/1785663003/ Deprecate FLAG_quic_use_new_idle_timeout Merge internal change: 115904466 https://codereview.chromium.org/1785693003/ Deprecate FLAG_quic_block_unencrypted_writes Merge internal change: 115909446 https://codereview.chromium.org/1784643006/ Clang formatting net/quic. Merge internal change: 115992556 https://codereview.chromium.org/1780783003/ Optionally defer responding to a QUIC ACK until all ACK processing has completed for an EpollServer iteration. Guarded by FLAG_quic_connection_defer_ack_response Merge internal change: 114770052 https://codereview.chromium.org/1782053003/ Deprecate FLAG_require_strike_register_or_server_nonce Merge internal change: 115891009 https://codereview.chromium.org/1785613005/ Add a boolean use_stateless_rejects_if_peer_supported argument to the QuicCryptoServerStream constructor instead of consulting FLAG_enable_quic_stateless_reject_support directly. No behavior change expected. Merge internal change: 115844136 https://codereview.chromium.org/1783713003/ Remove FEC from send path. Merge internal change: 115997404 https://codereview.chromium.org/1784903003/ Remove FEC code from receive path. Drop received FEC packet. Merge internal change: 116134765 https://codereview.chromium.org/1782143003/ Only cancel QUIC alarms if they have been set. Protected behind FLAG_quic_only_cancel_set_alarms Merge internal change: 116142833 https://codereview.chromium.org/1781073002/ Call QuicAlarm::IsSet instead of looking at deadline_ directly, rename some variables for readability. Merge internal change: 116146641 https://codereview.chromium.org/1778243005/ Add whether QUIC's unencrypted stream data was received or about to be sent in the error log. Logging only change. Merge internal change: 116152506 https://codereview.chromium.org/1782193002/ Temporarily store the raw QUIC packet in QuicConnection. Merge internal change: 116180343 https://codereview.chromium.org/1779313002/ Deprecate FLAG_quic_no_unencrypted_fec. Merge internal change: 116244697 https://codereview.chromium.org/1780573006/ Make ShouldCreateOutgoingDynamicStream a virtual method. Merge internal change: 116249386 https://codereview.chromium.org/1784933003/ Correctly handle EINTR during sendmsg in QuicSocketUtils::WritePacket. Merge internal change: 116261116 https://codereview.chromium.org/1780323002/ Simplify QUIC's encryption path now that FEC is gone. Protected by FLAG_quic_inplace_encryption. Merge internal change: 116266391 https://codereview.chromium.org/1785513003/ Remove the force param from QuicPacketGenerator::SetMaxPacketLength because path MTU packets should not be sent if the MTU cannot be changed. Not flag protected. Merge internal change: 116273065 https://codereview.chromium.org/1781043004/ Remove lastest_revived_packet from QuicAckFrame since FEC is gone. No functional change expected. Wire format is not changed yet. Merge internal change: 116411121 https://codereview.chromium.org/1787443002/ Remove is_fec_packet from TransmissionInfo and SerializedPacket. No functional change. Merge internal change: 116555910 https://codereview.chromium.org/1785853002/ Remove FEC related connection options and update FEC related comment in code base. Merge internal change: 116566297 https://codereview.chromium.org/1785863002/ Switch "const StringPiece&" to just "StringPiece" in QUIC code. No functional change. Not flag protected. Merge internal change: 116570346 https://codereview.chromium.org/1787453002/ Add a QuicCompressedCertsCache instance to QuicDispatcher, plumbing to QuicServerSessionBase but not used. No behavior change. Merge internal change: 116277134 https://codereview.chromium.org/1783783003/ Add more detailed logging to QUIC's ack validation. No functional change. Merge internal change: 116277228 https://codereview.chromium.org/1784963002/ Remove max_packet_length from QuicPacketGenerator, because it is no longer necessary with FEC gone. Not flag protected. Merge internal change: 116387934 https://codereview.chromium.org/1777423002/ Add QuicCompressedCertsCache* to QuicCrytoServerStream plumbed from QuicServerSessionBase. No behavior change. Merge internal change: 116388439 https://codereview.chromium.org/1782743005/ Remove unused return value from QuicAlarm::Delegate::OnAlarm. No behavior change, not protected. The only place in the codebase that returns something other than QuicTime::Zero() is the DelayAlarm in PacketDroppingTestWriter. I've the implementation of OnAlarm in there to set the alarm directly to the new time, rather than relying on the return value. Merge internal change: 116389752 https://codereview.chromium.org/1779883005/ Add a QUIC ScopedPacketBundler to send an ack when the ack alarm goes off. No functional change. Not flag protected. Merge internal change: 116391846 https://codereview.chromium.org/1786493003/ OnStreamEnd is now called instead of the sentinel call of OnStreamFrameData(stream_id, nullptr, 0, true). Protected by the flag FLAGS_spdy_on_stream_end. Merge internal change: 116272960 https://codereview.chromium.org/1777163003/ R=rch@chromium.org BUG= Review URL: https://codereview.chromium.org/1781123002 Cr-Commit-Position: refs/heads/master@{#380718}
* Migrate part of the quic code to net::IPAddress.martijn2016-02-161-11/+11
| | | | | | | | BUG=496258 Review URL: https://codereview.chromium.org/1682493002 Cr-Commit-Position: refs/heads/master@{#375616}
* Landing Recent QUIC changes until 2/7/2016 10:04 UTCfayang2016-02-131-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Define commonly used QUIC enums as int8_t to save memory and fix a static_assert. No functional change. Merge internal change: 113961942 https://codereview.chromium.org/1696523002/ Fix references to global symbols in base/log_severity.h. Merge internal change: 114061047 https://codereview.chromium.org/1685363003/ QUIC |ProofSource|: don't retain ownership of |out_certs|. The |ProofSource| API had returned a pointer to data of which it retained ownership. This is incompatible with the assumption that the |ProofSource| object can be safely destructed. Taking it on faith that there is a sound performance reason to avoid a copy in this case, this CL instead introduces a reference count (using shared_ptr) for the data in question. change QUIC proof source to use a reference-counted pointer to return certificates. No functional change expected. Merge internal change: 113980698 https://codereview.chromium.org/1689233003/ Use emplace_back instead of push_back in QUIC now that Chromium style guide allows it. Merge internal change: 113963690 https://codereview.chromium.org/1688193002/ Remove QuicSession::CloseConnectionWithDetails and call connection()->SendConnectionCloseWithDetails directly. QuicSession::CloseConnectionWithDetails is not pulling its weight as a helper method: hardly saves any characters, just means there's yet another path to closing a connection. Merge internal change: 113947119 https://codereview.chromium.org/1684263003/ QUIC: Send a connection close packet in response to a packet lacking version flag before version negotiated. Merge internal change: 113942068 https://codereview.chromium.org/1681223005/ Limits QUIC's local IP/port change verification to server-side. Since connection migration is currently designed to be client-initiated, this CL allows local IP and/or port changes at a client. Merge internal change: 113922841 https://codereview.chromium.org/1689823002/ Resets QUIC's RTO and TLP counts on connection migration. RTO and TLP counts are path-related SentPacketManager variables, and should be reset when the peer's address changes. This is particularly important at the client when early connection migration may be triggered via timeouts. Merge internal change: 113892226 https://codereview.chromium.org/1688683004/ Add keying material exporter to QUIC for token binding adds unused (for now) method to QuicCryptoStream Merge internal change: 113887857 https://codereview.chromium.org/1680423003/ Adding a QUIC_BUG stream-existence sanity check to the opt build Merge internal change: 113883554 https://codereview.chromium.org/1691593002/ Fix the comment for QUIC_CONNECTION_CANCELLED which is currently unused, but will be used by Chrome soon. n/a - comment only Merge internal change: 113877479 https://codereview.chromium.org/1685253002/ removing a log line which never should have been checked in Merge internal change: 113853229 https://codereview.chromium.org/1682373004/ Moving priorities out of shared QUIC !SPDY code Finishing the clean-up started in November (whew!) to pull priority APIs out of the base QUIC libraries. Should be a functional no-op since we stopped using the priority field when we switched to the new write blocked list. This whole set of changes should make moving to the H2 style dependency tree somewhat simpler. Merge internal change: 113848994 https://codereview.chromium.org/1680243004/ Move DeterminePeerAddressChangeType() from QuicConnection to QuicUtils. Merge internal change: 113774550 https://codereview.chromium.org/1687883002/ Deprecate FLAGS_quic_limit_max_cwnd. Merge internal change: 113769379 https://codereview.chromium.org/1688763002/ Add a QUIC_BUG to QuicCryptoServerStream::OnHandshakeMessage. Merge internal change: 113746027 https://codereview.chromium.org/1690573004/ Re-order logic and variable declarations in QUIC bandwidth resumption logic. No behavior change. Merge internal change: 113737889 https://codereview.chromium.org/1686853002/ Reorder QUIC struct fields based on ClassLayoutOptimizer. No functional change. Merge internal change: 113704971 https://codereview.chromium.org/1683913002/ Add an enum to replace a boolean "from_peer" argument when closing QUIC connections. No behavior change. It appears that nothing in google3 uses the old from_peer argument, but I'm planning on using it in an upcoming CL which will log connection closes in TransportConnectionStats. Merge internal change: 113669690 https://codereview.chromium.org/1687633002/ Rename CloseConnection to OnUnrecoverableError in the QuicPacketCreator visitor. No behavior change. Merge internal change: 113636823 https://codereview.chromium.org/1682153002/ Factor out common TCP sender functionality into a new TcpCubicSenderBase class from TcpCubicSender and TcpCubicBytesSender. Merge internal change: 113634514 https://codereview.chromium.org/1684723002/ Make CacheNetworkParameters logging unconditional. protected by FLAGS_quic_log_received_parameters Previously, we would only log the CachedNetworkParameters received from the client to the TransportConnectionStats when we actually USED the parameters to do bandwidth-resumption. Bandwidth-resumption is currently disabled, so we have no insight into what these parameters contain. The client is sending them. We're just not recording them to the log. In this flag-protected CL, we will unconditionally log the received CachedNetworkParameters to the TransportConnectionStats. This way we can study them (if we want), to see how we might use them in the future. Merge internal change: 113633148 https://codereview.chromium.org/1682553002/ Remove the unused QUIC method LossAlgorithmInterface::DetectLostPackets. n/a(Unused code) Merge internal change: 113630418 https://codereview.chromium.org/1680743004/ Drop non-awaited revived packet. Merge internal change: 113574317 https://codereview.chromium.org/1681753002/ deprecating FLAGS_quic_write_blocked_list Merge internal change: 113549613 https://codereview.chromium.org/1678873003/ Add some log message context to QUIC_BUG in received_packet_manager Merge internal change: 113548899 https://codereview.chromium.org/1681493003/ Minor refactor to QUIC's HybridSlowStart. No functional change. Merge internal change: 113542148 https://codereview.chromium.org/1678933002/ Add wtrace agent to quic test_tools visibility and TAP test patterns n/a (visibility and TAP pattern changes only) Merge internal change: 113520970 https://codereview.chromium.org/1681493003/ BUG= Review URL: https://codereview.chromium.org/1694813003 Cr-Commit-Position: refs/heads/master@{#375325}
* Landing Recent QUIC changes until 01/23/2016 00:42 UTCjri2016-01-291-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QUIC support for processing a received PUSH_PROMISE. Protected by FLAGS_quic_client_side_server_push This contains PUSH_PROMISE validation, stream creation, and mechanism to allow rendezvous between a client request and a pushed stream for the same URL. The rendevous mechanism is only partial, it will be completed in a followup CL that handles the higher level client changes as well. Merge internal change: 112817210 https://codereview.chromium.org/1646193002/ Forces QUIC PING packets to be sent immediately. PING frames are retransmittable, and are subject to congestion control. This CL causes PING frames to be sent immediately, without regard to the congestion window. PING frames continue to count towards bytes_in_flight. Merge internal change: 112808455 https://codereview.chromium.org/1639183003/ fixing a bug with quic priorities/batching. Behind FLAGS_quic_cede_correctly. Merge internal change: 112799471 https://codereview.chromium.org/1639203002/ Initialize QuicPacketCreator::HasCryptoHandshake in the constructor. No functional change. Fixes msan error. Merge internal change: 112796318 https://codereview.chromium.org/1637423002/ Move QuicAckListenerInterface definition into quic_protocol.h to resolve mutual #include problem in order to pass layering check. No behavior change. Merge internal change: 112795935 https://codereview.chromium.org/1640013002/ Singular bit 7 should be referred to as such Merge internal change: 112720462 https://codereview.chromium.org/1635613005/ Adds a ProcessUdpPacket method to QuicSession, which simply passes the call on to the connection. No behavior change. Merge internal change: 112711489 https://codereview.chromium.org/1640433002/ Deprecate --FLAGS_quic_use_primary_config_for_proof. Merge internal change: 112710941 https://codereview.chromium.org/1639523003/ Some changes in QuicSentPacketManager which are used to implement QuicMultipathSentPacketManager. (no functional change) The reason of this change is trying to break QuicMultipathSentPacketManager change to several portable changes. Merge internal change: 112685891 https://codereview.chromium.org/1638763002/ For QUIC authenticated encryption algorithms, change last 8 bytes of IV to comprise packet path id and lower 7 bytes of packet number. Protected behind FLAGS_quic_include_path_id_in_iv. If a packet does not explicit contain path id (multipath_flag is off), path id is considered to be the default path id 0. Merge internal change: 112684240 https://codereview.chromium.org/1637513005/ Changes to enum names and minor changes to QUIC connection migration code. Changes ChangeType enum names (used by connection migration code.) Removes an extraneous enum value and makes a minor change to migration logic. Merge internal change: 112632867 https://codereview.chromium.org/1638463004/ Fixes tests that fail with feature flags turned on. Merge internal change: 112697688 https://codereview.chromium.org/1638463004/ Place all members of QUIC's RetransmittableFrames into SerializedPacket. No functional change. Merge internal change: 112478643 https://codereview.chromium.org/1635643003/ No longer save the old value of needs_padding_ in QuicPacketCreator, because it is reset every packet. Protected by FLAGS_quic_retransmit_via_onserializedpacket. Merge internal change: 112436293 https://codereview.chromium.org/1631943002/ Always send packets through QuicConnection::OnSerializedPacket. Protected by FLAGS_quic_retransmit_via_onserializedpacket. Merge internal change: 112424832 https://codereview.chromium.org/1636543003/ R=rch@chromium.org BUG= Review URL: https://codereview.chromium.org/1642063004 Cr-Commit-Position: refs/heads/master@{#372301}
* Change IPEndpoint::address() to return a net::IPAddressmartijn2016-01-271-6/+6
| | | | | | | | | | | | | | | This CL is part of the net::IPAddressNumber migration[1]. IPEndpoint::address() currently returns a net::IPAddressNumber but we need it to return a net::IPAddress. BUG=496258 TBR=scheib [1] https://code.google.com/p/chromium/issues/detail?id=496258#c10 Review URL: https://codereview.chromium.org/1565303002 Cr-Commit-Position: refs/heads/master@{#371750}
* Landing Recent QUIC changes until 1/8/2015 23:22 UTCzhongyi2016-01-121-4/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | relnote: Allowing multipath support negotiation. Protected by --quic_enable_multipath, default value is false. Merge internal change: 111718558 https://codereview.chromium.org/1572033003 relnote: Implement server push methods in QuicSimpleServerSession. Only modify toy Quic server, not used in production. Merege internal change: 111716301 https://codereview.chromium.org/1570343005 relnote: Require QUIC handshakes to require either a valid server nonce or a remote strike register. Merge internal change: 111708360 https://codereview.chromium.org/1569853005 relnote: n/a test-only change. Change QUIC's General and TCP loss algorithm tests to create RetransmittableFrames with a QuicStreamFrame instead of no stream frames. Merge internal change: 111655037 https://codereview.chromium.org/1570363002 relnote: Re-enable strike register lookups for QUIC replay protection, until at least QUIC_VERSION_31. Not flag protected, as Chrome currently only talks QUIC_VERSION_25. Merge internal change: 111628540 https://codereview.chromium.org/1574633002 relnote: n/a (test only) Always create a SerializedPacket with at least one QuicFrame in the RetransmittableFrames. Merge internal change: 111570157 https://codereview.chromium.org/1576553003 relnote: quic_supports_push_promise should be disabled by default. Merge internal change: 111560672 https://codereview.chromium.org/1576623002 relnote: QUIC header streams support to receive PUSH_PROMISE. Protected by --quic_supports_push_promise. This is part of shared code, but client side functionality only. Merge internal change: 111542509 https://codereview.chromium.org/1572013002 relnote: always sending kFIXD And extending the lifetime of the flag. When we deprecate the old version we can flip it false again and then nuke the code. Merge internal change: 111507546 https://codereview.chromium.org/1574623002 relnote: Merge all fields of QueuedPacket into SerializedPacket. No functional change. Makes it easier to make SerializedPacket a class that owns its members in the future. Merge internal change: 111444711 https://codereview.chromium.org/1569823008 relnote: Deprecate reloadable_flag_quic_inplace_encryption. Merge internal change: 111440524 https://codereview.chromium.org/1570553002 relnote: add new unused functions for client side of QUIC server push. QUIC - Add helper functions for SpdyHeaderBlock values. Merge internal change: 111439689 https://codereview.chromium.org/1561383002 relnote: n/a (test only) QUIC - make MockConnectionHelper::TestAlarm public. This is test only, and no-op for now. It will be used by a subsequent CL in support of client-side server push. Merge internal change: 111427940 https://codereview.chromium.org/1563083002 relnote: Adds Slow Start with Large Reduction (SSLR) option in QUIC to do a large reduction of the congestion window when exiting slow start. When exiting slow start due to loss, SSLR causes the congestion window to be reduced by the number of losses encountered at the end of slow start. SSLR is expected to reduce retransmission rates when exiting slow start, and it should also help the congestion window converge rapidly when the connection's actual BDP is smaller than the IW. Merge internal change: 111385694 https://codereview.chromium.org/1566853002 relnote: Clear the FEC group in QuicPacketCreator when encryption_level is none and close the connection if SerializeFec is called. Protected by gfe2_reloadable_flag_never_write_unencrypted_data. Merge internal change: 111385311 https://codereview.chromium.org/1562833003 relnote: Moving many QUIC DFATALS over to QUIC_BUG Merge internal change: 111359954 https://codereview.chromium.org/1565883003 relnote: Change memcpy to memmove in QuicFramer::EncryptPayload, because the src and dest buffers may be identical. No functional change. Merge internal change: 111345350 https://codereview.chromium.org/1558423002 rel-note: A small refactoring to make RecordSpuriousRetransmission() of QuicSentPacketManager simpler. (no functional change) Merge internal change: 111321766 https://codereview.chromium.org/1566633002 BUG= Review URL: https://codereview.chromium.org/1579033002 Cr-Commit-Position: refs/heads/master@{#368964}
* Switch to standard integer types in net/.Avi Drissman2015-12-201-8/+7
| | | | | | | | | BUG=488550 TBR=mmenke@chromium.org Review URL: https://codereview.chromium.org/1535363003 . Cr-Commit-Position: refs/heads/master@{#366297}
* Add path_id to QuicAckFrame and QuicStopWaitingFrame structs (Wire format ↵jri2015-12-141-2/+181
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | does not change yet). The path_id in these two frames are needed to write multipath sent/received packet managers. Merge internal change: 109409136 https://codereview.chromium.org/1521663002/ change the public construtor of QuicStreamFrame to not take const char*. Prevent crash on windows due to undeterministic argument evaluation order. Merge internal change: 109333756 https://codereview.chromium.org/1515253002/ If a QUIC client sends an STK but no SCID, use the primary config to attempt to validate it. Protected by FLAGS_quic_validate_stk_without_scid Re-landing cl/109238062 (plus flag protection) which was rolled back. Merge internal change: 109330357 https://codereview.chromium.org/1519893002/ Make QuicPacketGenerator and QuicPacketCreator path-aware (not in use currently). QuicPacketGenerator: Add function SetCurrentPath. QuicPacketCreator: Add function SetCurrentPath. Add current_path_ and multipath_packet_number_. Merge internal change: 109319437 https://codereview.chromium.org/1512763014/ Pull out the QUIC trailing header key ":final-offset" into a string constant. No behavior change. Merge internal change: 109296307 https://codereview.chromium.org/1518873003/ Add an end-to-end test to reproduce the QUIC TOO_MANY_REJECTS problem. Merge internal change: 109246210 https://codereview.chromium.org/1518993002/ QUIC inchoate CHLOs may now include an SCID. Merge internal change: 109238070 https://codereview.chromium.org/1514303002/ Change the memset in QuicWriteBlockList's constructor to be safer. No functional change. Suggested in https://codereview.chromium.org/1470713003/diff/100001/net/quic/quic_write_blocked_list.cc Merge internal change: 109233513 https://codereview.chromium.org/1520613005/ Add a new set_chlo_multiplier() method to QuicCryptoServerConfig to change the amount of amplification attack protection is required. Only called in tests. Merge internal change: 109228560 https://codereview.chromium.org/1513253004/ Refine QuicSession::HasOpenDynamicStreams() to use comparison. No behavior change. Replace implicit int to bool conversion with comparison operation in QuicSession. Merge internal change: 109226224 https://codereview.chromium.org/1519623003/ Add new methods to allow QuicServerSession to initiate a stream. n/a(new unused method in QuicServerSession to prepare for Quic Server Push) Merge internal change: 109209620 https://codereview.chromium.org/1517113002/ add 3 new fields in QuicSession which count incoming streams and are used in condition check while creating a new stream. Protected by FLAGS_quic_distinguish_incoming_outgoing_streams, on by default. The three variables are: num_dynamic_incoming_streams_; num_draining_incoming_streams_; num_locally_closed_incoming_streams_highest_offset_; Merge internal change: 109194594 https://codereview.chromium.org/1504333011/ Add a test for receiving Headers, Body+FIN, Trailers in QuicSpdyStream. n/a (test only) Merge internal change: 109194547 https://codereview.chromium.org/1519463003/ Add HTTP/2 Trailers support to QuicSpdy{Server,Client}Stream. Protected behind existing FLAGS_quic_supports_trailers. Merge internal change: 109193759 https://codereview.chromium.org/1518653002/ Add an unused WriteTrailers method to QuicSpdyStream. Protected behind existing FLAGS_quic_supports_trailers Merge internal change: 109188553 https://codereview.chromium.org/1508853012/ QuicSpdyStream::FinishedReadingTrailers now checks for received FIN as secondary indication that trailers have been read. Protected behind existing FLAGS_quic_supports_trailers Merge internal change: 109187066 https://codereview.chromium.org/1519453002/ Remove kStartOfHashData and QuicData::BeforePlaintext. No functional change. Merge internal change: 109151090 https://codereview.chromium.org/1514473006/ Add a new QUIC common cert set to reflect the new GIA cert. Merge internal change: 109136151 https://codereview.chromium.org/1510223005/ Increase the multiplier of the CHLO message size that a REJ message must stay under when the client doesn't present a valid source-address token from 2 to 3. Merge internal change: 109122060 https://codereview.chromium.org/1513993002/ QUIC: Always use primary config when getting proof When calling ProofSource::GetProof, always use the primary config. Since the QuicCryptoServerConfig's primary config could change partway through processing the handshake, this also stores the primary config's SCID in the state maintained by QuicCryptoServerStream. fix QUIC_PROOF_INVALID bug in QUIC_VERSION_26, gated by FLAGS_quic_use_primary_config_for_proof Merge internal change: 109113945 https://codereview.chromium.org/1513193002/ Change a bunch of log messages from DLOG(INFO) to DVLOG(1), capitalize messages, and make their output consistent with variable names. n/a (DLOG only) Merge internal change: 109113290 https://codereview.chromium.org/1508393003/ Deleting DLOG message in QuicStreamSequencer. I don't think it's useful - the flag will go away soon and will always use this - and more importantly it access the id() field of the incomplete ReliableQuicStream. This constructor is called during initialization of ReliableQuicStream, and before the id_ field in ReliableQuicStream is initialized. n/a (deleting DLOG) Merge internal change: 109113068 https://codereview.chromium.org/1513163002/ Add ack_frame_updated_ to ReceivePacketManager (not in use currently). Merge internal change: 109108430 https://codereview.chromium.org/1515743003/ Add has_ack and has_stop_waiting to QuicPacketCreator and remove them from QuicPacketGenerator. No functional change. Merge internal change: 109007771 https://codereview.chromium.org/1512123004/ n/a (delete unused variable in test) Merge internal change: 108972933 https://codereview.chromium.org/1515703004/ QuicSpdyStream supports receiving trailing headers frames. Flag protected by FLAGS_quic_support_trailers This is not expected to cause changes in production, as no client should be sending Trailers. That said, this is being flag protected as it does potentially change behavior, and the FLAG is intended to cover further CLs as Trailers support is fleshed out. Merge internal change: 108972403 https://codereview.chromium.org/1518483003/ R=rch@chromium.org BUG= Review URL: https://codereview.chromium.org/1515353002 Cr-Commit-Position: refs/heads/master@{#364987}
* QUIC - delete #ifdef USE_OPENSSL in unittests.rtenneti2015-11-051-29/+0
| | | | | | | | | | | | | | | + Deleted #ifdef USE_OPENSSL from QUIC tests. + Fixed/enabled QuicChromiumClientSessionTest unittests. + Use real ProofVerifier for ProofTests and when USE_OPENSSL is enabled. + Use fake proof verifier when NSS is enabled. + FakeProofVerifier verifies the certificates using MockCertVerifier. Initialized certificates ala OPENSSL's code. R=rch@chromium.org Review URL: https://codereview.chromium.org/1415933006 Cr-Commit-Position: refs/heads/master@{#358085}
* Landing Recent QUIC changes until: Fri Oct 30 22:23:58 2015 +0000rch2015-11-041-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change QuicAckFrame's revived_packets to be a single QuicPacketNumber. QUIC now ignores all but the last packet revived by FEC. Consumes 24 bytes less and is faster and simpler. Merge internal change: 106729701 https://codereview.chromium.org/1431693002/ Fix a comment in quic_dispatcher.cc to mention the correct method. Merge internal change: 106724344 https://codereview.chromium.org/1418213011/ Add a new method to QuicSpdySession Add a public method OnHeadersHeadOfLineBlocking() which does nothing. This method is used to replace EXPECT_CALL(Log()) in quic headers stream test. Merge internal change: 106716057 https://codereview.chromium.org/1410243007/ Simplify QUIC stateless rejects by latching the value of FLAGS_enable_quic_stateless_reject_support directly in the QuicCryptoServerStream constructor instead of requiring that it be passed in via a setter. Merge internal change: 106714904 https://codereview.chromium.org/1411223011/ Add support of serving SCT on the server side in QUIC, gated by QUIC_VERSION_30. Add support of serving SCT in QUIC. Flag-protected. The protocol works like below: 1. The client sends CSCT tag associated with an empty value in client hello to indicate that it supports cert transparency. 2. If so, the server responds with the signed certificate timestamp (SCT) using the same tag. Merge internal change: 106709176 https://codereview.chromium.org/1416583005/ Put a space between available window value and ">=" in log output. Merge internal change: 106687764 https://codereview.chromium.org/1424313006/ Remove FLAGS_quic_session_map_threshold_for_stateless_rejects, and instead always use stateless rejects when the peer supports it and when FLAGS_gfe2_reloadable_flag_enable_quic_stateless_reject_support is true. Merge internal change: 106656452 https://codereview.chromium.org/1417033008/ Create a new data structure StreamSequencerBuffer for QuicStreamSequencer. Currently QuicStreamSequencer is using std::list to store frames, which could buffer a series of tiny stream frames if the frames arrive so. And they are read out independently as very small strings never coalesced. StreamSequencerBuffer coalesce these small strings and read them out as a whole. It is a circular stream buffer with random write and in-sequence read. It consists of an array of pointers pointing to memory block de/allocated using new/delete and a list of GapRange objects to indicate the missing data between the data already been written into the buffer. And it keeps tracking the total bytes having been read out. Merge internal change: 106593539 https://codereview.chromium.org/1409053006/ Remove unused method OnPacketSent from QuicPacketDroppingTestWriter::Delegate. Merge internal change: 106492030 https://codereview.chromium.org/1422563005/ Remove unused member variables. No functional change. Remove unused QuicClock from TcpCubicSender and TcpCubicBytesSender. Merge internal change: 106458891 https://codereview.chromium.org/1406023017/ Remove unused input argument. No functional change expected. Merge internal change: 106451721 https://codereview.chromium.org/1410013010/ Change QuicWallTime to have microsecond granularity. Merge internal change: 106446616 https://codereview.chromium.org/1421873007/ On client address changes, only migrate QUIC connections when client address changes are considered to be caused by NATs. Add an enum PeerAddressChangeType. On each peer address change, the change type is determined before the connection migration. Merge internal change: 106444524 https://codereview.chromium.org/1420623004/ Make QUIC stateless rejects work in the face of packet loss by storing the SREJ packet(s) in the QuicTimeWaitListManager so they can be retransmitted. Store QUIC SREJ packet(s) in the QuicTimeWaitListManager. Merge internal change: 106433678 https://codereview.chromium.org/1424653008/ Remove QuicPacketCreator::fec_group_number_; replace it with QuicFecGroupInterface::FecGroupNumber(). No behavior change expected. Merge internal change: 106432163 https://codereview.chromium.org/1409813006/ Remove unused QuicErrorCode QUIC_PACKET_FOR_NONEXISTENT_STREAM. No behavior change. Merge internal change: 106425553 https://codereview.chromium.org/1408963003/ Merge GetIncomingDynamicStream and GetDynamicStream into a single GetOrCreateDynamicStream method in QuicSession. No behavior change. Merge internal change: 106421704 https://codereview.chromium.org/1422533006/ Rename MockHelper to the more descriptive (and more consistent with other Mock classes) MockConnectionHelper. Merge internal change: 106419223 https://codereview.chromium.org/1433433003/ Remove the QuicPacketGenerator from the PacketTooLarge EndToEndTest and no longer allow too large packets to be created by the QuicPacketCreator. Merge internal change: 106414015 https://codereview.chromium.org/1411953005/ fix a comment in quic_session.h Merge internal change: 106400931 https://codereview.chromium.org/1408183008/ Cleanup: Call OnWriteError instead of directly closing the connection when failing to send a QUIC version negotiation packet. No behavior change. Merge internal change: 106397442 https://codereview.chromium.org/1424043003/ Removing quic_allow_oversized_packets_for_test by generating and writing packets without a QuicConnection. Test-only change. Merge internal change: 106394664 https://codereview.chromium.org/1415743010/ Change QuicFramer::EncryptPayload to return the length of the encrypted payload rather than a new EncryptedPacket. Merge internal change: 106389203 Fix QUIC end to end test Merge internal change: 106366330 https://codereview.chromium.org/1421703005/ Remove the kMaxSegmentSize constant from QUIC's TcpCubicSender and TcpCubicBytesSender and replace with the identical kDefaultTCPMSS. Also fixes an error where the bandwidth resumption check was incorrectly using kMaxPacketSize. Changes bandwidth resumption CWNDs by less than 1%. Merge internal change: 106356338 https://codereview.chromium.org/1413193009/ Correct (enlarge) the situations when QuicPacketGenerator::MaybeSendFecPacketAndCloseGroup calls packet_creator_.StopFecProtectingPackets. Merge internal change: 106333315 https://codereview.chromium.org/1417533011/ Factor QuicCryptoClientStream APIs into QuicCryptoClientStreamBase. Merge internal change: 106327944 https://codereview.chromium.org/1425363002/ Add new version QUIC_VERSION_29 in which streams honor RST_STREAM + NO_ERROR. Override QuicDataStream OnStreamReset method to honor QUIC_STREAM_NO_ERROR on QUIC_VERSION_29 and later versions: close write side only and leave read side open to read response data from server. Merge internal change: 106313860 https://codereview.chromium.org/1413143004/ Review URL: https://codereview.chromium.org/1421853006 Cr-Commit-Position: refs/heads/master@{#357761}
* Landing Recent QUIC changes until 9:17 AM, Oct 26 2015 UTC-7ckrasic2015-10-311-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unroll QuicPacketCreator::CopyToBuffer and prefetch the next iov when possible. Merge internal change: 106305702 Fully qualify std::* names being exported internally by using declarations in stl. These using declarations are a historical artifact and they hinder portability and toolchain changes. Merge internal change: 106194954 Change QUIC's SendAlgorithmInterface::OnCongestionEvent to use a QuicByteCount instead of an entire TransmissionInfo, because the other fields were unused. No functional change. Merge internal change: 106159730 Deprecate use_interval_set_. Merge internal change: 106158486 (Correct a comment.) Merge internal change: 106095793 (test only) Use data stream id to process decompressed header and data frames. Always register the QuicSpdyServerStreamPeer in session's dynamic_stream_map, pass ownership to session. Merge internal change: 106092098 Change the PacketTimeList to be a PacketTimeVector, because it is more memory efficient. Small functional change to clear all timestamps if any are too old in sequence number space. Merge internal change: 106063258 Fix the interaction between QUIC stateless rejects and version negotiation. Move the code which closes statelessly rejected server connections from the QuicDispatcher to the QuicCryptoServerStream. This permits the connection be closed even when the packet which creates the connection is not the packet which solicits the stateless reject. Merge internal change: 105994917 Rename a large number of QuicAckListeners to listener from delegate. No functional change. Merge internal change: 105984563 Remove the ProxyAckNotifierDelegate class from QUIC's ack listener pipeline because it was only a passthrough. No functional change. Merge internal change: 105972541 Deprecate flag quic_no_ack_notifier and remove the QuicAckNotifier and QuicAckNotifierManager. Merge internal change: 105964824 Pass QuicIOVector by value; it's too small to be passed by reference. No functional change. Merge internal change: 105961176 Remove C++11 library features from QuicTestServer. Merge internal change: 105906226 test fixes, and bugfix to unblock new streams, blocked due to max open limit, as unfinished streams retire. Remove QUIC_TOO_MANY_UNFINISHED_STREAMS. Unfinished streams should be counted same as the open streams to prevent buggy client to initate too many streams. The server will refuse streams with TOO_MANY_OPEN_STREAMS when the checking for TOO_MANY_UNFINISHED_STREAMS is removed. Merge internal change: 105904662 BUG= Review URL: https://codereview.chromium.org/1423033005 Cr-Commit-Position: refs/heads/master@{#357273}
* Remove insecure QUIC supportrch2015-10-261-8/+34
| | | | | | | | | | | | | | Require a ProofSource in QuicCryptoServerConfig (this includes requiring SSL config for secure quic listeners) Require a ProofVerifier in QuicCryptoClientConfig. Remove is_https from QuicServerId. Remove is_secure from QuicServer. Merge internal change: 103869607 Review URL: https://codereview.chromium.org/1411063004 Cr-Commit-Position: refs/heads/master@{#356047}
* Landing Recent QUIC changes until 10/14/2015 20:20 UTCalyssar2015-10-221-19/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reducing test overhead Merge internal change: 105789944 (No-op in chrome code) Enable end-to-end tests for QUIC stateless rejects when they will not involve version negotiation. This will increase the number of end-to-end test permutations by a factor of 4, to 239. WOW! Merge internal change: 105517568 https://codereview.chromium.org/1419733003/ Remove unused ENDPOINT macro from QuicSpdyStream. No behavior change. Merge internal change: 105506241 https://codereview.chromium.org/1418823003/ Remove QuicFecGroup::MinProtectedPacket which is no longer needed. No behavior change expected. Merge internal change: 105507189 https://codereview.chromium.org/1413443005/ Fix the semantics of QuicFecGroup::ProtectsPacketsBefore into IsWaitingForPacketBefore. Certain edge cases are now handled correctly. Merge internal change: 105440916 https://codereview.chromium.org/1417683003/ Rename QuicDataStream to QuicSpdyStream. No behavior change. QuicDataStream deals with HTTP2 (SPDY) headers. This is the extra behavior it introduces from the base ReliableQuicStream class. QuicSpdyStream is a more descriptive name, that clearly indicates this class is specifically for use with SPDY over QUIC. Merge internal change: 105435253 https://codereview.chromium.org/1423463003/ Introduces QuicStreamSequencerBufferInterface with one implementation. Refactor, no behavior change. Write an abstract class for QuicFrameList to prepare changes of underlying data structure used to buffer received StreamFrame's in sequencer. And changed some method names for readability. Merge internal change: 105311433 https://codereview.chromium.org/1414573004/ Minor refactor of QuicTimeWaitListManager::ProcessPacket to use early returns. Merge internal change: 105435080 https://codereview.chromium.org/1413713005/ Moving flag send_goaway_after_client_migration out of shared code Merge internal change: 105358957 https://codereview.chromium.org/1410733007/ Update handling of std::function objects (in this case mainly TODOs). Should cause no behavior change. Merge internal change: 105317858 https://codereview.chromium.org/1413353003/ R=rch@chromium.org BUG= Review URL: https://codereview.chromium.org/1416763005 Cr-Commit-Position: refs/heads/master@{#355559}
* Landing Recent QUIC changes until 9/30/2015 20:43 UTC.rtenneti2015-10-151-13/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL doesn't include "remove inscure QUIC support" CL. relnote: Inline all frames smaller than a pointer into QuicFrame. No functional change. Merge internal change: 104330302 https://codereview.chromium.org/1399893005/ relnote: Avoid redundant recvmmsg when the previous recvmmsg returned less than the requested number of packets. Guarded by FLAGS_quic_read_packets_full_recvmmsg. This has no measurable effect on the QUIC microbenchmark, though it should avoid an extra call to recvmmsg at a minimum. Merge internal change: 104327020 https://codereview.chromium.org/1404873003/ relnote: n/a (QUIC test tools). Cleanup: use C++11 delegate constructor in quic_test_client, and clang-format to Chromium style: clang-format -i --style="{BasedOnStyle: Chromium, Standard: Cpp11}" quic_test_client.cc Merge internal change: 104305494 https://codereview.chromium.org/1407473005/ relnote: n/a (standalone quic_server binary). Cleanup: Use C++11 delegate constructor in quic_server Merge internal change: 104305451 https://codereview.chromium.org/1405843003/ relnote: Reduce the size of QUIC's TransmissionInfo struct based on suggestions from ClassLayoutOptimizer. No functional change. Merge internal change: 104242241 https://codereview.chromium.org/1401053005/ relnote: add test cases to catch failure on uninitialized self_address_ on chromium side, always set the self_address_ when client creates a new session and connection. There's a corner case in quic_client, when it tries to write to the first packet, the write fails. Previously we did not set self_address_ immediately when we created a new quic_connection. This leads to a crash on chromium side when logging the uninitialized self_address. Merge internal change: 104130818 https://codereview.chromium.org/1395423009/ relnote: n/a (comment only). Add comment about |proof_source|, adds ownership comment about |server_nonce_entropy|. Merge internal change: 104108540 https://codereview.chromium.org/1403643005/ relnote: Cache-align the encryption buffer in QuicPacketCreator::SerializePacket. Merge internal change: 104095714 https://codereview.chromium.org/1402943004/ relnote: Disables strike register lookups when talking QUIC_VERSION_27 or higher (not yet used by Chrome). Merge internal change: 103965712 https://codereview.chromium.org/1404053002/ relnote: Remove unused supported_versions argument from QuicTimeWaitListManager. No behavior change. Merge internal change: 103964623 https://codereview.chromium.org/1404013002/ relnote: Check QUIC handshake reject_reasons to decide whether to send a REJ. No behavior change, not protected. Simplifies things a little in the server crypto code. Instead of storing both a reject_reason *and* a boolean indicating whether there was a problem, just store the reject reason and use the presence of any such reasons to decide to send a REJ. Merge internal change: 103949902 https://codereview.chromium.org/1404523004/ relnote: Create Quic version 28. The receiver refuses to create a stream if too many streams are open, rather than closing the connection. FIXED=22475509,22476505 Merge internal change: 103943396 https://codereview.chromium.org/1398403006/ R=rch@chromium.org Review URL: https://codereview.chromium.org/1406983002 Cr-Commit-Position: refs/heads/master@{#354371}
* net: Replace COMPILE_ASSERT with static_assert.tfarina2015-10-131-1/+1
| | | | | | | | | | | | | | Since our toolchain supports c++'s static_assert, we can just use it instead of COMPILE_ASSERT (which actually is just defined to static_assert anyway). BUG=442514 TEST=net_unittests R=eroman@chromium.org Review URL: https://codereview.chromium.org/1408503002 Cr-Commit-Position: refs/heads/master@{#353882}
* Landing Recent QUIC changes until 9/23/2015 19:17 UTC.rtenneti2015-10-131-52/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | relnote: Relax limits on open/available streams. Flag protected by FLAGS_allow_many_available_streams; enabled by default. Rename "implicitly created" streams to "available [to be opened]" streams. These are streams whose ID is less than the largest stream ID which has arrived from the peer, but which themselves have never arrived from the peer (that is, opened or reset). Available streams no longer count in the quota of opened streams. Available streams now have a separate quota which is 10 times the number of opened streams. Merge internal change: 103669396 https://codereview.chromium.org/1399883008/ relnote: Fixes QUIC's Cubic code to shift epoch instead of reset on quiescence. Flag-protected under FLAGS_shift_quic_cubic_epoch_when_app_limited. Implements Neal Cardwell's suggestion that helps retain the Cubic shape across a quiescence period. Merge internal change: 103652773 https://codereview.chromium.org/1392333003/ relnote: Delete unused server_address arguments from QuicDispatcher. No behavior change. Merge internal change: 103644472 https://codereview.chromium.org/1400103003/ relnote: Rename QuicAckNotifier::DelegateInterface into QuicAckListenerInterface, because QuicAckNotifier will eventually be removed. No functional change. Merge internal change: 103565657 https://codereview.chromium.org/1400103002/ relnote: Reorder CHLO validation in QUIC. No behavior change. Move the client nonce checks later in EvaluateClientHello. Now all references to client nonces are at the end of this method, which will allow an easier earlier return when in a followup CL I disable strike register replay protection. Merge internal change: 103116881 https://codereview.chromium.org/1401283002/ relnote: Introduces QUIC_VERSION_27: adds a nonce to the SHLO. Adds a nonce to the SHLO (if the version is > QUIC_VERSION_26), and this is used for key derivation if present (client and server side). In the case that the SHLO nonce is present, any nonce sent in the REJ is ignored for the purposes of key derivation. Followup CL will remove strike register lookups on the server side when talking QUIC_VERSION_27, and to stop sending client nonces, and server nonces in the REJ. Merge internal change: 103111083 https://codereview.chromium.org/1403843002/ relnote: n/a (test only). Tidy up of crypto_server_test.cc * Store QuicVersion as string and version (to be used in followup CL) * Use the stored version consistently throughout * Consistently use .c_str() instead of a mix of .data() and .c_str() * Add clang-format on/off annotations Merge internal change: 103109015 https://codereview.chromium.org/1407433002/ relnote: Split QUIC's OnPacketEvent into OnPacketRetransmitted and OnPacketAcked, because otherwise arguments are unused. Not yet used, no functional change. Merge internal change: 103107529 https://codereview.chromium.org/1392323005/ relnote: Cleanup changes only. Should cause no behavior change. Merge internal change: 103092141 https://codereview.chromium.org/1392373006/ R=rch@chromium.org Review URL: https://codereview.chromium.org/1401193004 Cr-Commit-Position: refs/heads/master@{#353696}
* Landing Recent QUIC changes until 9/14/2015 19:47 UTCzhongyi2015-09-221-7/+120
| | | | | | | | | | | | | | | | | | | | | | | | | relnote: Change QuicSpdyServerStream to correctly handle multiple Content-Length values. Merge internal change: 103019414 https://codereview.chromium.org/1356263002/ relnote: deprecate FLAGS_quic_limit_mtu_by_writer. Merge internal change: 102991700 https://codereview.chromium.org/1358913002/ relnote: Add XLCT tag to QUIC client hello gated by QUIC_VERSION_26. In the client hello, the client sends the XLCT tag to indicate what it expects the server's leaf certificate to be. If present, the server verifies the tag and rejects the hello if the value in the tag doesn't match. Merge internal change: 102874973 https://codereview.chromium.org/1358713002/ Review URL: https://codereview.chromium.org/1360843002 Cr-Commit-Position: refs/heads/master@{#350208}
* Implement an openssl version of a QUIC ProofSource.rch2015-09-081-1/+5
| | | | | | | | BUG=525144,514472 Review URL: https://codereview.chromium.org/1309813003 Cr-Commit-Position: refs/heads/master@{#347831}
* Landing Recent QUIC changes until 8/19/2015 17:00 UTC.rtenneti2015-08-271-83/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | relnote: Compute parity faster by only XORing bytes which are needed and doing that word at a time. No behavior change. FIXED=22811863 Merge internal change: 101033533 https://codereview.chromium.org/1320743002/ Added QuicConfig::SetInitialReceivedConnectionOptions to set initial received connection options and added unittests. The following is the internal merge note: Enable setting of connection options via relodable flag for testing Added a new flag for setting server-side connection options explicitly via command-line flag. Previously, the only way to turn an option on for the server was through a message sent from the client. For live testing, we sometimes want to be able to turn such options on the server, without having to introduce a special flag for enabling each option. The new flag takes a comma-separated list of options as its value. It parses the list and sets the tag for each value. If the flag is set on a live server, it will only have effect on newly created sessions, not existing ones. relnote: n/a. New options flag will only be used for testing. Merge internal change: 100966796 https://codereview.chromium.org/1302263003/ relnote: n/a (QUIC test only). Remove RunValidate method from crypto_server_test.cc. Not very helpful, only used in a couple of places. Merge internal change: 100955404 https://codereview.chromium.org/1301333003/ relnote: n/a (QUIC test only). Remove CryptoTestUtils::BuildMessage and InchoateClientHello (confusingly named as it was often called with tags not from an inchoate CHLO...). Changes due to "git cl format net" and added clang-format off/on to avoid reformatting. Merge internal change: 100952704 https://codereview.chromium.org/1311813003/ Working on other changes in this file, getting annoyed that clang formatting my CL was resulting in more changes than I'd expected. This CL runs clang-format against quic/crypto/crypto_server_test.cc (and protects some handshake message formatting) $ clang-format --style="{BasedOnStyle: Chromium, Standard: Cpp11}" ./quic/crypto/crypto_server_test.cc Merge internal change: 100955098 https://codereview.chromium.org/1311813003/ relnote: After a server silo receives a packet from a migrated client, a GO_AWAY frame is sent to the client. Protected behind FLAGS_send_goaway_after_client_migration. Merge internal change: 100947609 https://codereview.chromium.org/1319433006/ relnote: Deprecate FLAGS_increase_time_wait_list. Merge internal change: 100922172 https://codereview.chromium.org/1320713002/ relnote: Depreacate FLAGS_quic_limit_pacing_burst. Merge internal change: 100852361 https://codereview.chromium.org/1305313006/ relnote: Cleanup changes. No behavior changes expected. Change name of FakeTimeEpollServer::AdvanceByAndCallCallbacks to AdvanceByAndWaitForEventsAndExecuteCallbacks. Merge internal change: 100850550 https://codereview.chromium.org/1302233005/ R=rch@chromium.org Review URL: https://codereview.chromium.org/1315023003 Cr-Commit-Position: refs/heads/master@{#345803}
* Landing Recent QUIC changes until 7/27/2015 18:48 UTC.rtenneti2015-07-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QUIC - Moved packets_between_mtu_probes() to QuicConnectionPeer because it is used in tests only. Merge change 1226083005 from Chrome. relnote: n/a (test-only change) Merge internal change: 99201483 https://codereview.chromium.org/1262463005/ Make MTU probe failure test run faster by sending probes sooner. relnote: n/a (test-only change) FIXED=22720425 Merge internal change: 99067184 https://codereview.chromium.org/1262463004/ Changed LocalSocketAddress to local_address. That is the only QUIC specific change in the following CL merge. Rest of the changes are to fix "Do not attempt to SetQos on FdWrappers that don't support QoS.". Merge internal change: 99058919 https://codereview.chromium.org/1260793005/ QUIC - minor comment fix. Created bugs for the following DISABLED tests. + ProofTest::DISABLED_Verify + CryptoServerTest::DISABLED_DefaultCert https://codereview.chromium.org/1260793004/ relnote: Instantiate an HTTP/2 SpdyFramer instead of a SPDY/3 SpdyFramer in QUIC's toy client and server stream code. There should be no behavior change, because the only method on that framer which is called is ParseHeaderBlockInBuffer() which behaves identially for SPDY/3 and HTTP/2. In any case, these classes are not part of the internal server code. Merge internal change: 99048851 https://codereview.chromium.org/1254973007/ Replace map<string,string> with SpdyHeaderBlock typedef. No behavior change. Missed this in cl/98865397 (didn't port CL 98865397 because it has SPDY changes). relnote: n/a (QUIC client change) Merge internal change: 98929211 https://codereview.chromium.org/1260133002/ relnote: Return 0 instead of false in case of error in QuicFramer::SerializedFrameLength. No behavior change. Merge internal change: 98861345 https://codereview.chromium.org/1260833002/ relnote: Add missing space to logging message. git cl format net changes. Merge internal change: 98824828 https://codereview.chromium.org/1254373003/ R=rch@chromium.org Review URL: https://codereview.chromium.org/1254343005 Cr-Commit-Position: refs/heads/master@{#340639}
* Land Recent QUIC Changes until 04/30/2015.rtenneti2015-05-011-15/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Deprecate --FLAGS_quic_do_not_retransmit_for_reset_streams. Merge internal change: 92249265 https://codereview.chromium.org/1111703003/ Remove QUIC v23 This means that the headers stream only speaks SPDY/4. This removes the congestion feedback tag vector from the handshake. Merge internal change: 92245766 https://codereview.chromium.org/1115883002/ Fix a minor bug in TcpCubicSender in the conversion from packets to bytes. Merge internal change: 92010035 https://codereview.chromium.org/1103163006/ Don't calculate or send bandwidth resumption source address tokens when the bandwidth resumption experiment is disabled. Estimated to save 0.5% of CPU on bandaid. Merge internal change: 92003353 https://codereview.chromium.org/1113833003/ Allocate encrypted packets into a buffer on the stack. Estimated to save ~4% of CPU. Merge internal change: 92000931 https://codereview.chromium.org/1115873002/ Flag-protected. Add SREJ support to quic crypto server config. ProcessClientHello and BuildRejection now take two extra arugments, indicating a) that the server should generate stateless rejects and b) if stateless, the new connection ID that should be added to the message. In theory, every reject emitted could be a stateless reject. The tests have been modified with two new parameters: 1. Stateless reject support enabled via flag. 2. Server configured to emit stateless rejects. They then check to ensure that, if enabled, the reject is formatted correctly. In chromium, set FLAGS_enable_quic_stateless_reject_support to false. Merge internal change: 91946386 https://codereview.chromium.org/1112693005/ Break out QUIC's balsa-specific SPDY utilities from SpdyUtils to SpdyBalsaUtils to help ease the process of merging to Chrome. Merge internal change: 91854176 https://codereview.chromium.org/1112923002/ Prevent a crash when the stream frame is NULL. Log an detailed DFATAL and close the connection instead. Merge internal change: 91820383 https://codereview.chromium.org/1111413004/ Doing a better job of cleaning up quic udp proxy state. Fully tearing down the client we use for probing connectivity to core when we do UDP proxying, while preserving the file descriptor. Chrome specific change: make CleanUpUDPSocket virtual. Merge internal change: 91805238 https://codereview.chromium.org/1120433002/ Update QuicPacketGeneratorTest to save every packet when it's serialized into a vector instead of into separate variables. Test only change. Merge internal change: 91631596 https://codereview.chromium.org/1105283003/ Update QuicPacketGeneratorTest to save every packet when it's serialized into a vector instead of into separate variables. Test only change. Merge internal change: 91631596 https://codereview.chromium.org/1105283003/ Change QuicPacketGenerator's destructor to use the more compact for syntax. No functional change. Merge internal change: 91620560 https://codereview.chromium.org/1117503002/ Adding a comment to make clear the toy server is a toy. Merge internal change: 91604221 https://codereview.chromium.org/1113713002/ Minor code QUIC readability improvements. No functional changes. Merge internal change: 91545808 https://codereview.chromium.org/1116543002/ Add QuicClientCryptoConfig stateless-reject support. (This change is not flag-protected, since it only affects the client-side.) When the QuicClientCryptoConfig receives a stateless reject, it will read the server-designated connection ID from the reject message. It will store that ID in its cached config for subsequent use. The Cache itself can now store a server-designated connection-id for one-time use. Clients can query the cache to see whether it stores a server-designated connection-ID. If so, the client can consume the ID. Subsequent queries will indicate that there is no server-designated connection-ID until another stateless reject is returned. Note: Currently, the cached config state only stores one server-designated connection ID at a time. Merge internal change: 91419089 https://codereview.chromium.org/1116463004/ Adding EXPECT_CALLs to prevent gMock warnings. Replacing scoped_ptr with unique_ptr. Lowering some DLOG(INFO)s to DVLOG(1). n/a (Tests and debug logging only.) Merge internal change: 91343963 https://codereview.chromium.org/1117483002/ Remove unused argument TransmissionType from QUIC's ShouldGeneratePacket. No functional change. Merge internal change: 91300968 https://codereview.chromium.org/1113553003/ Reorganize the packet validity check code. Add checks to not create connections for packets with large seq. nos. or truncated conn. IDs. Reorganize the packet validity checks to make the packet sequence number accessible to the dispatcher's packet-classification logic: Put most of the logic in OnUnauthenticatedHeader, which is called after the sequence number is decoded. Add validity checks and tests of the validity checks. Merge internal change: 91299299 https://codereview.chromium.org/1110243002/ Setting QoS for UDP proxy backends (two machine canary on internal servers). Merge internal change: 91293512 https://codereview.chromium.org/1109793006/ R=rch@chromium.org Review URL: https://codereview.chromium.org/1115853003 Cr-Commit-Position: refs/heads/master@{#327851}
* Use IPAddressNumber instead of IPEndPoint in QuicCryptoServerConfigrch2015-03-301-4/+5
| | | | | | | | to minimized diffs with internal code. Review URL: https://codereview.chromium.org/1046683002 Cr-Commit-Position: refs/heads/master@{#322735}
* Cleanup: Better constify some strings in net/.thestig2015-01-241-3/+3
| | | | | | Review URL: https://codereview.chromium.org/696033002 Cr-Commit-Position: refs/heads/master@{#312985}
* Land Recent QUIC Changes.rtenneti2015-01-211-25/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removing QUIC version 22. This includes removing the (deprecated) congestion feedback frame, and all of the ancilliary data which is safe to remove. The one unfortunate oversight is that sending the (now unused) congestion feedback configuration option is still required, so that is moved to optional but must be sent until all versions expecting it have been sunset. Bleh. Merge internal change: 83969804 https://codereview.chromium.org/859163002/ Deprecate FLAGS_quic_disallow_multiple_pending_ack_frames. Merge internal change: 83791744 https://codereview.chromium.org/864633002/ Deprecate FLAGS_quic_empty_data_no_fin_early_return. Merge internal change: 83788904 https://codereview.chromium.org/863843002/ Limit the number of connections on the QUIC time wait list Currently, the only way in which we limit the time-wait list is to prevent any connection from staying on the list for more than a configured number of seconds (currently 5). In theory, if we got spammed with enough connection open/close in a 5 second period, the list could get unreasonably long. Added a flag for hard-limiting the actual length of the list. Add hard-limit to QUIC time-wait list length. Protected by FLAGS_quic_limit_time_wait_liste_size. Merge internal change: 83769362 https://codereview.chromium.org/862793002/ Going through quic_flags.cc I noticed a stale flag which was never ENABLED, but has been true via flags since flags push in July. Given that this flag is only relevant in the frontline internal servers, and it's been true there for months thanks to avd@ getting the reloadable flags working, I'm claiming we can skip the normal process and just kill it off as if it had been true in the binary. Speak now or forever hold your peace! Removing DEFINED flag FLAGS_send_quic_crypto_reject_reason Merge internal change: 83752616 https://codereview.chromium.org/851403002/ quic_client_bin.cc now supports secure QUIC, and will try and use secure QUIC if --port=443 Merge internal change: 83647038 https://codereview.chromium.org/807023009/ Tiny cleanup of QuicPacketGenerator::ConsumeData to simplify an expression. Merge internal change: 83647200 https://codereview.chromium.org/855163002/ Correctly plumb QUIC priorities down to the SPDY framing on the headers stream. Merge internal change: 84162114 https://codereview.chromium.org/818543006/ R=rch@chromium.org Review URL: https://codereview.chromium.org/864673002 Cr-Commit-Position: refs/heads/master@{#312370}
* replace COMPILE_ASSERT with static_assert in net/mostynb2015-01-201-1/+1
| | | | | | | | | BUG=442514 TBR=abarth Review URL: https://codereview.chromium.org/826973002 Cr-Commit-Position: refs/heads/master@{#312238}
* Land Recent QUIC Changes.rtenneti2014-12-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QUIC-specific variable name change. Changes largest_observed_acked to rtt_updated in various places to be more accurate. Merge internal change: 81685775 https://codereview.chromium.org/800213002/ Changing QUIC cert selection to do VIP based selection. Used IPEndPoint as the type for server_ip in all methods ala client_ip. Ran "git cl format net" to fix formatting issues. Merge internal change: 81571450 https://codereview.chromium.org/802873002/ QUIC - Added QuicConnectionPeer::GetStats while porting the following intenal server change: Improving rtt for QUIC for 0-rtt handshakes guarded by a flag. Merge internal change: 81435895 https://codereview.chromium.org/798183002/ QUIC - use the correct type and fix the formatting fixes. Changes found while merging the following change from Peter Kasting into the internal source tree. "pkasting CL: https://codereview.chromium.org/761863002/ Clean up type usage and fix MSVC "truncated value" warnings in net/quic/. The existing code is very inconsistent about whether it uses typedefs like QuickByteCount and QuicPacketCount or whether it instead uses fundamental types like uint32, uint64, and size_t. This is not only more confusing to read, in some cases it leads to MSVC warning about "possibly truncated value" when one type is implicitly converted to another, shorter one. This attempts to fix at least some of these sorts of problems by using the typedefed types more widely when possible, or else at least the same basic types other places are already using. It also fixes various warnings by including explicit casts (sometimes with legality checks)." No functionality change. Changes to keep the code similar to internal source tree. Merge internal change: 81428557 https://codereview.chromium.org/787253005/ Use std::cbrt instead of our own CubeRoot implementation. Merge internal change: 81420733 https://codereview.chromium.org/798153002/ R=rch@chromium.org Review URL: https://codereview.chromium.org/805603002 Cr-Commit-Position: refs/heads/master@{#308415}
* Standardize usage of virtual/override/final specifiers.dcheng2014-10-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Google C++ style guide states: Explicitly annotate overrides of virtual functions or virtual destructors with an override or (less frequently) final specifier. Older (pre-C++11) code will use the virtual keyword as an inferior alternative annotation. For clarity, use exactly one of override, final, or virtual when declaring an override. To better conform to these guidelines, the following constructs have been rewritten: - if a base class has a virtual destructor, then: virtual ~Foo(); -> ~Foo() override; - virtual void Foo() override; -> void Foo() override; - virtual void Foo() override final; -> void Foo() final; This patch was automatically generated. The clang plugin can generate fixit hints, which are suggested edits when it is 100% sure it knows how to fix a problem. The hints from the clang plugin were applied to the source tree using the tool in https://codereview.chromium.org/598073004. BUG=417463 R=pauljensen@chromium.org Review URL: https://codereview.chromium.org/663043004 Cr-Commit-Position: refs/heads/master@{#301452}
* Standardize usage of virtual/override/final in net/dcheng2014-10-211-2/+2
| | | | | | | | | | | | This patch was automatically generated by applying clang fixit hints generated by the plugin to the source tree. BUG=417463 TBR=rsleevi@chromium.org Review URL: https://codereview.chromium.org/667923003 Cr-Commit-Position: refs/heads/master@{#300466}
* replace OVERRIDE and FINAL with override and final in net/mostynb2014-10-091-1/+1
| | | | | | | | BUG=417463 Review URL: https://codereview.chromium.org/623213004 Cr-Commit-Position: refs/heads/master@{#298844}
* QUIC - (no behavior change) s/NULL/nullptr/g in .../quic/...rtenneti2014-10-021-14/+14
| | | | | | | | | | | | C++11 in Chromium! http://g/quic-dev/iBPFBDwPMjQ Merge internal change: 76451118 R=rch@chromium.org, rjshade@chromium.org Review URL: https://codereview.chromium.org/612323013 Cr-Commit-Position: refs/heads/master@{#297937}
* Reject reasons from strike register when nonce validation fails.rtenneti@chromium.org2014-07-171-3/+3
| | | | | | | | | | | | Send reject reason to client for debugging purposes. Merge internal change: 70366491 R=wtc@chromium.org Review URL: https://codereview.chromium.org/388333005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283692 0039d316-1c4b-4281-b951-d872f2087c98
* Land Recent QUIC Changes.rtenneti@chromium.org2014-06-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Deleted unneeded enums from HandshakeFailureReason. Updated the comments for enums. Replaced CLIENT_NONCE_UNKNOWN_FAILURE with CLIENT_NONCE_INVALID_FAILURE. In CL: 69888738, replaced usage of CLIENT_NONCE_UNKNOWN_FAILURE with the correct reason. Fixed comments from wtc in CLs: 69773346, 69963869 Minor cleanup of code. Merge internal change: 70135161 https://codereview.chromium.org/359823002/ Clarifying comment in quic_sent_packet_manager.h Merge internal change: 70122967 https://codereview.chromium.org/335463009/ Simplify the QuicDispatcher::OnCanWrite logic Before a refactoring, connections used to be able to add themselves to QuicDispatcher::write_blocked_list_ even when they weren't write-blocked, making it necessary to give each connection only one attempt to write. However, this is no longer the case. Thus, the QuicDispatcher::OnCanWrite can now simply keep going until either no work is left or a connection gets write-blocked, and it's guaranteed that no connection will come up twice (since if it gets added back to write_blocked_list_, it is now blocked and the loop terminates). I've added a longer explanatory comment and inserted a stronger check to make sure the condition holds. Simplify QuicDispatcher::OnCanWrite logic Most of the changes were already in net/quic/quic_dispatcher.*. Merged missing changes. Merge internal change: 70043318 https://codereview.chromium.org/359653003/ Repair the CWND reduction caused by spurious RTO's in QUIC's congestion control. Merge internal change: 70033195 https://codereview.chromium.org/352403002/ Minor change - subtract 1 from reject reason before left shifting while recording in UMA histogram (more over UMA we can not track 2147483648). Merge internal change: 69982953 https://codereview.chromium.org/337263004/ Renumber HandshakeFailureReason enums so that there are no big gaps. Changed quic_crypto_client_config.cc to just left shift the reject reason before uploading the reject reasons to UMA. Thanks rch for the suggestion. Deleted RejectReasonToPackedError and the unit tests for that method. Minor cleanup of code. Merge internal change: 69963869 https://codereview.chromium.org/345563009/ Killing off quic V17. Not flag protected. Merge internal change: 69929257 https://codereview.chromium.org/350973003/ Adds an internal server and chromium's flag for disabling/enabling FEC protection, and control of FEC policy using client-specified tags. Internal server's flag can be used for enabling/disabling FEC protection. For FEC protection to be used, client has to request protection through the config in the CHLO. Only one tag is currently specified (kHDR, which maps to FEC protection for the headers and crypto streams), but the plan is to introduce at least one more tag soon (kHED, which will map to FEC protection for the headers and crypto streams and also the heads of all other streams.). These tags map to overall FEC configs, and the plan is to try out configs via finch. Disabled FLAGS_enable_quic_fec flag in chromium. Will enable in a separate CL after talking with jri. Merge internal change: 69898759 https://codereview.chromium.org/351133002/ Move HandshakeFailureReason from quic_crypto_server_config.h into crypto_handshake.h because it is shared with quic_crypto_client_config.h (per review comments from wtc). Minor cleanup of the code. Merge internal change: 69895742 https://codereview.chromium.org/354943002/ Fix QUIC's SendAlgorithmSimulator to fix an off by 1 error in the buffer size calculation, allowing packets to be sent faster than the simulated bandwidth. Merge internal change: 69885161 https://codereview.chromium.org/350733006/ QUIC - Merging internal changes to pack reject reason. These changes will be redone in the merge CLs: 69895742, 69982953, 69963869 Merge internal change: 69862576 https://codereview.chromium.org/349513004/ R=rch@chromium.org, wtc@chromium.org Review URL: https://codereview.chromium.org/355573007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280647 0039d316-1c4b-4281-b951-d872f2087c98
* QUIC - cleanup changes to keep in sync with internal source tree.rtenneti@chromium.org2014-06-211-3/+4
| | | | | | | | | | | | | | | | | | | | This CL fixes the comments in Patch Set 4 of CL: 331143006 which were made in the internal source tree first. https://codereview.chromium.org/331143006/#ps80001 + Don't use static_cast<uint32>. + Comment fixes + Added COMPILE_ASSERT(sizeof(QuicTag) == == sizeof(uint32) + Use uint32 instead of QuicTag. Merge internal change: 69652987 R=rch@chromium.org, wtc@chromium.org Review URL: https://codereview.chromium.org/336273006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278942 0039d316-1c4b-4281-b951-d872f2087c98
* QUIC Crypto - return the reasons for reject message. Reject reasonrtenneti@chromium.org2014-06-191-13/+213
| | | | | | | | | | | | | | | | | contains failures due to invalid source address token client nonce and server nonce. Will add UMA histogram in chrome when this CL is merged. Send reject reason to client for debugging purposes. Protected behind new flags: FLAGS_use_early_return_when_verifying_chlo and FLAGS_send_quic_crypto_reject_reason Merge internal change: 69227401 R=jar@chromium.org, wtc@chromium.org, avd@google.com Review URL: https://codereview.chromium.org/331143006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278523 0039d316-1c4b-4281-b951-d872f2087c98
* QUIC - Minor change to keep the code similar to internal source tree.rtenneti@chromium.org2014-06-191-1/+1
| | | | | | | | | | | | | + Minor fixes to using order, comments and chromium indentation nits. + Use EXPECT_EQ instead of EXPECT_TRUE. Merge internal change: 69401047 R=rch@chromium.org,wtc@chromium.org, Review URL: https://codereview.chromium.org/345453003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278319 0039d316-1c4b-4281-b951-d872f2087c98
* Land Recent QUIC Changes.rtenneti@chromium.org2014-06-181-33/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Trying to merge as many of flow control changes as possible before the branch (we have all changed until Fri 06/13 21:20 UTC). Test tools for udp proxying. This involves a few refactors of test tools but nothing which affects the internal server. minor refactors to allow quic udp proxy testing. Merge internal change: 69157651 https://codereview.chromium.org/331963002/ Added FEC policy per stream, which is translated to an FEC protection value on writes further on down. Merge internal change: 69153464 https://codereview.chromium.org/338623002/ Pull out stream/session updates from OnConfigNegotiated. Preparation for updating stream/session with different received windows. QUIC refector: Pull out stream/session updates from OnConfigNegotiated Merge internal change: 69106467 https://codereview.chromium.org/337723003/ Rather than passing initial_flow_control_window all the way down the call stack, put it inside QuicConfig as intended: each member of QuicConfig has a "value to send" field, so populate this at the top level. rtenneti: when porting to Chromium, you should add config.SetInitialFlowControlWindowToSend(kInitialReceiveWindowSize) in QuicStreamFactory::CreateSession, just above line 837: *session = new QuicClientSession(...) Store initial flow control window for QUIC in QuicConfig. No behavior change intended. Added the following unit tests to EndToEndTest.cc + DoNotSetResumeWriteAlarmIfConnectionFlowControlBlocked + NegotiateMaxOpenStreams Merge internal change: 69079363 https://codereview.chromium.org/333803007/ First version of a QUIC SendAlgorithmSimulator which is designed to simulate BBR and TCP flows and changes. Merge internal change: 69035927 https://codereview.chromium.org/330163003/ R=rch@chromium.org, wtc@chromium.org Review URL: https://codereview.chromium.org/330333006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277959 0039d316-1c4b-4281-b951-d872f2087c98
* Land Recent QUIC Changesrtenneti@chromium.org2014-03-311-2/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove a LOG_IF(DFATAL) for retransmitting packets which were never given a sent time. This DCHECK was firing on Chrome when Windows buffered a packet and before the callback for the packet being sent, Chrome received a server reject and had to change crypto context and retransmit all unacked packets. Merge internal change: 63686840 https://codereview.chromium.org/214413009/ Rename of QUIC flow control member variables to be more explicit (prefix flow_control) and more descriptive ("max" instead of "initial"). Merge internal change: 63599012 https://codereview.chromium.org/215423003/ Change comment in QuicSessionTest to be more accurate, and add another expectation to ensure stream is not flow control blocked before sending any data. Merge internal change: 63604321 Fixed compilation warnings in quic_sent_packet_manager_test.cc. https://codereview.chromium.org/214823010/ Added UseWriter changes to QuicTestClient while porting internal code that handles the client side of unwinding UDP proxied QUIC changes. Merge internal change: 63542972 https://codereview.chromium.org/214083003/ Change to QUIC's SendAlgorithmInterface to remove IsHandshake from TimeUntilSend. Changed QuicSentPacketManager to ensure it always retransmitted crypto handshake packets before other retransmissions. Merge internal change: 63540663 https://codereview.chromium.org/214923003/ Removing TransmissionType from QUIC's TimeUntilSend method. The only real user was was TcpCubicSender for tail loss probe, and TLP is better fully contained within the SentPacketManager. Merge internal change: 63501475 https://codereview.chromium.org/214083002/ Removed unnecessary transmission_type from Quic's send algorithm interface. The few remaining uses were improper, so there is a minor change in behavior. Merge internal change: 63480011 https://codereview.chromium.org/211693004/ Introduce QUIC_VERSION_17: per-stream flow control. Default send window is 16 KB, and the client/server can specify higher values in their CHLO/SHLO messages. WINDOW_UPDATE frames are sent when the receiver has consumed more than half of their receive window (behavior copied from SPDY), and BLOCKED frames are sent if a write is attempted while flow control blocked. Protected behind FLAGS_enable_quic_stream_flow_control. Merge internal change: 63474251 https://codereview.chromium.org/211743005/ Adding an accessor to quic dispatcher. Merge internal change: 63470311 https://codereview.chromium.org/208273008/ R=rch@chromium.org Review URL: https://codereview.chromium.org/215663002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260637 0039d316-1c4b-4281-b951-d872f2087c98
* Land Recent QUIC Changes.rtenneti@chromium.org2014-03-071-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor of QUIC's rtt storage and calculation to have a single RttStats object used by the SentPacketManager, LossDetectionAlgorithms, and SendAlgorithms. Merge internal change: 62624956 https://codereview.chromium.org/185053006/ QUIC refactor to move the pending_crypto_packet_count_ from the QuicSentPacketManager to the QuicUnackedPacketMap. Merge internal change: 62614116 https://codereview.chromium.org/188273003/ QUIC - Fix the spelling error in "frame received." message. Merge internal change: 62491376 https://codereview.chromium.org/188173003/ Doing a best-effort attempt to send connection close packet for open quic connection before we call exit(). The actual sending of the connection close is flag protected, though worst case we'd crash right before exit() anyway. Merge internal change: 62484710 https://codereview.chromium.org/180953008/ Test only change to QUIC TCPLossAlgorithmTest to ensure the early retransmit alarms is set for the earliest outstanding packet. Merge internal change: 62438180 https://codereview.chromium.org/188153003/ CL generated with data from dead-code analysis using Scythe remove_dead_code tool. Cleanup of net/quic using Scythe Merge internal change: 62404986 https://codereview.chromium.org/183683025/ Allow fixed (non-negotiated) values to be sent in QUIC CHLO/SHLO. Also adds IFCW tag for describing initial flow control window in CHLO/SHLO. Not used yet. Merge internal change: 62403534 https://codereview.chromium.org/188183002/ Sync'ing changes with internal tree. https://codereview.chromium.org/184853014/ Merge internal change: 62295877 Make the VER tag required in QUIC CHLO and SHLO messages. Merge internal change: 62286870 https://codereview.chromium.org/186313002/ R=rch@chromium.org Review URL: https://codereview.chromium.org/188333003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255503 0039d316-1c4b-4281-b951-d872f2087c98
* Land Recent QUIC Changes.rtenneti@chromium.org2014-02-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow running the test server in secure mode. Merge internal change: 62164374 https://codereview.chromium.org/181413007/ Implement special behaviors (closing and timing out) in the test server. Testing only. Merge internal change: 62158630 https://codereview.chromium.org/177293008/ Moving a preexisting DCHECK to a new and more helpful dfatal. Merge internal change: 62089588 https://codereview.chromium.org/181463007/ PACKET_NBYTE_GUID -> PACKET_NBYTE_CONNECTION_ID GUID->ConnectionId QuicGuid->QuicConnectionId guid->connection_id except for the dos proto, which I'm leaving alone for now. renaming quic guid to connection id. no functional change. Merge internal change: 62087636 https://codereview.chromium.org/181483006/ QUIC-local change to extend per-connection stats. Extending QuicConnectionStats to add two Cubic-related stats. Merge internal change: 61977906 https://codereview.chromium.org/177843017/ Implement an early retransmit timer in QUIC's TcpLossAlgorithm to replace immediate loss and retransmission. Merge internal change: 61976680 https://codereview.chromium.org/182083002/ Add a time based loss detection algorithm to QUIC that loses packets after 1.25RTTs and at least one nack. Merge internal change: 61975778 https://codereview.chromium.org/182063002/ QUIC test cleanup to always use MockLossAlgorithm in QuicConnectionTest. Merge internal change: 61972606 https://codereview.chromium.org/180783003/ Minor optimizations to QuicUnackedPacketMap and QuicSentPacketManager to improve load testing. Merge internal change: 61961987 https://codereview.chromium.org/181433007/ Cleanup: Rename http_message_test_utils.{h,cc,_test.cc} to http_message.{h,cc,_test.cc} This is how it should be named (defines/tests class HTTPMessage), and it's confusingly similar to the unrelated http_message_utils.h n/a (test only) Merge internal change: 61955207 https://codereview.chromium.org/181703005/ Test-only change to QuicConnectionTest to use MockLossAlgorithm instead of specific details of the TCP loss detection algorithm. Merge internal change: 61953382 https://codereview.chromium.org/181693005/ Add mock methods for SendBlocked and SendWindowUpdate in QuicConnection (test only) Merge internal change: 61945606 https://codereview.chromium.org/181973002/ Add SendWindowUpdate and SendBlocked methods to QuicConnection. Not used yet. Merge internal change: 61915742 https://codereview.chromium.org/181413005/ Start using the loss timeout in QuicSentPacketManager and add a mock implementation of the LossDetectionInterface for testing. Merge internal change: 61903890 https://codereview.chromium.org/181723003/ R=rch@chromium.org Review URL: https://codereview.chromium.org/182523002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@253899 0039d316-1c4b-4281-b951-d872f2087c98
* Log QUIC public reset client address mismatch to a histogram.wtc@chromium.org2014-02-141-7/+20
| | | | | | | | | | | | | | | Remove the client_address member from QuicCryptoNegotiatedParameters. Replace it by the client_address_ member of QuicConnectionLogger. Add kCADR support to CryptoHandshakeMessage::DebugStringInternal. R=jar@chromium.org,rch@chromium.org BUG=none TEST=none Review URL: https://codereview.chromium.org/159143007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251258 0039d316-1c4b-4281-b951-d872f2087c98
* Add the kCADR (client address) tag to ServerHello.wtc@chromium.org2014-01-251-8/+7
| | | | | | | | | | | | | | | | | | It allows the server to send the observed client IP address and port to the client. Add the QuicSocketAddressCoder class for serializing and parsing a socket address (IP address and port). Merge internal CL: 60101137 R=rch@chromium.org,rtenneti@chromium.org BUG=none TEST=net_unittests Review URL: https://codereview.chromium.org/145003011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247101 0039d316-1c4b-4281-b951-d872f2087c98
* Land Recent QUIC Changes.rtenneti@chromium.org2014-01-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eliminate separate boolean tracking socket writeability in QuicConnection; query the writer instead. This CL tries to minimize behavior changes, so no actual bugfixes. Connection will now check writer's status instead of its local flag, so it will refuse to write sooner. Merge internal change: 59603011 https://codereview.chromium.org/138843003/ Change QUIC's SendAlgorithmInterface to have a separate UpdateRtt method instead of passing it in with every acked packet. This fixes a bug where the RTT was not being updated when retransmitted packets were acked and one where a very large RTT could be used when packets are acked before being sent. Merge internal change: 59572874 https://codereview.chromium.org/138843003/ Break out of the loop in QuicSession::OnCanWrite if the QuicConnection is congestion control blocked. This fixes a weird form of starvation among same-priority streams caused by streams often ending up in the same order in the WriteBlockedList before and after QuicSession::OnCanWrite. Stop iterating through QUIC write blocked streams if the connection is congestion-control blocked to avoid starvation of same-priority streams. Not flag protected. Merge internal change: 59513911 https://codereview.chromium.org/139103002/ Fix a bug where the packet was put into unacked packets when it was serialized and acked before being sent. This was only ever seen on Chrome with very short RTTs. Merge internal change: 59408566 https://codereview.chromium.org/133683010/ WriteBlockedList for QUIC that prioritizes Crypto and Headers streams over data streams. Not flag protected. Merge internal change: 59400238 https://codereview.chromium.org/137893008/ Create an interface for explicit notification of Dispatcher about blocked writers; port TimeWaitListManager to the new interface. Merge internal change: 59396227 https://codereview.chromium.org/138503006/ Remove WritePacket() from internal server's QuicDispatcher; Integrating internal changes to clean up QuicDispatcher. Merge internal change: 59346874 https://codereview.chromium.org/131743007/ Reset QUIC's retransmission counters whenever a new packet is acked which updates the RTT estimate. Previously the counters were only done when the left edge was acked, which could cause excessive backoff when the connection was making progress. Merge internal change: 59292726 https://codereview.chromium.org/138273004/ Implement QuicPacketWriterWrapper. This lets us replace or embellish the low-level writer without disturbing connections that keep a pointer to the top level. Merge internal change: 59287995 https://codereview.chromium.org/138273004/ Use basictypes.h consistenly in QUIC code instead of macros.h and/or integral_types.h Simply refactoring includes. Sync'ed with internal source code for include of basictypes.h. Merge internal change: 59287325 https://codereview.chromium.org/136853005/ Use the right priority when marking QUIC streams write blocked via QuicFdWrapper::SetReady. Not flag protected. Used NULL instead of nullptr. Fixed QuicReliableClientStreamTests to pass. Activated the QuicReliableClientStream in the QuicSession so that session's MarkWriteBlocked knows about the stream. Merge internal change: 59263642 https://codereview.chromium.org/136523005/ R=rch@chromium.org Review URL: https://codereview.chromium.org/131743009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245204 0039d316-1c4b-4281-b951-d872f2087c98
* Land Recent QUIC Changes.rtenneti@chromium.org2014-01-041-8/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add helper methods to QUIC test client and peers that allow access to information needed to test 0-Rtt behavior when talking to cluster-wide strike registers. QUIC testing infrastructure. Merge internal change: 58551796 https://codereview.chromium.org/124183003/ Release QuicCryptoServerConfig::strike_register_client_lock_ before doing calls to VerifyNonceIsValidAndUnique in order to minimize the amount of work that happens while strike_register_client_lock_ is locked. This is important because VerifyNonceIsValidAndUnique may invoke the done callback before returning, which may take arbitrary time or create a lock cycle if invoked while the lock is held. Relax strike_register_client_ locking requirements. Merge internal change: 58551166 https://codereview.chromium.org/110753005/ Rename GetIncomingReliableStream to GetIncomingDataStream. Merge internal change: 58538145 https://codereview.chromium.org/111283004/ Suppress noisy messages in QuicTimeWaitListManagerTest. Merge internal change: 58422536 https://codereview.chromium.org/123623002/ Implement a TCP tail loss probe which will fire twice before the RTO fires. The tail loss probe gets re-armed every time a packet is sent. Merge internal change: 58420170 https://codereview.chromium.org/123523004/ Move all the packet parsing logic into QuicDispatcher from the QuicServer / QuicDispatcher / QuicTimeWaitListManager. Merge internal change: 58413216 https://codereview.chromium.org/123303003/ R=rch@chromium.org Review URL: https://codereview.chromium.org/124003005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242987 0039d316-1c4b-4281-b951-d872f2087c98
* Land Recent QUIC Changes.rtenneti@chromium.org2013-11-261-2/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QUIC Refactor to move the call to OnPacketAbandoned() for retransmissions into QuicCongestionManager. Merge internal change: 57233749 https://codereview.chromium.org/85463010/ Rename two methods in SendAlgorithmInterface * OnIncomingAck -> OnPacketAcked * OnIncomingLoss -> OnPacketLost Merge internal change: 57120421 https://codereview.chromium.org/85663006/ Implement Early Retransmit(RFC5827) in QUIC's TCP congestion control. Merge internal change: 57097940 https://codereview.chromium.org/85663005/ De-flake internal end_to_end_tests when pacing is used. Adds a new HasQueuedData method, and removes NumWriteBlockedStreams method to QuicSession, which is only called from tests. Merge internal change: 57090300 https://codereview.chromium.org/84723005/ Send the server's supported QUIC versions in the SHLO. Send the client's supported QUIC version in the CHLO. Detect downgrade attacks. Add QUIC versions to the QUIC handshake messages. Merge internal change: 57057343 https://codereview.chromium.org/85773006/ Change QUIC's nack counting to be based on the gap between the missing packet and the largest observed, instead of the number of ack frames processed. Merge internal change: 57031841 https://codereview.chromium.org/85383010/ QUIC - sync'ing chromium and internal source. Minor clean up of the code. Merge internal change: 57264741 https://codereview.chromium.org/86483007/ R=rch@chromium.org Review URL: https://codereview.chromium.org/87013002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237410 0039d316-1c4b-4281-b951-d872f2087c98
* Land Recent QUIC Changes.rtenneti@chromium.org2013-11-191-14/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QUIC - manually sync'ing changes between chrome and internal source code. Refactorings to QuicCryptoServerConfig to allow for async quic client hello validation. Merge internal change: 56375103 - Remove the QuicConnectionPeer::GetCongestionManager method (can call QuicConnection()::congestion_manager() directly now). - Update a bunch of CongestionManager/SendAlgorithm methods to be const. Merge internal change: 56361306 Change the QuicDispatcher to immediately put packets in time wait when there is no version negotiation packet, instead of creating a new session. Merge internal change: 56353674 Add a new PacingSender which can be used to add pacing on top of an existing QUIC sender. Merge internal change: 56183480 Move StrikeRegisterClient to gfe/quic/crypto, so that QuicCryptoServerConfig can depend on it. Implement a StrikeRegisterClient that queries a local StrikeRegister. See internal CL 56173502 for use cases. Merge internal change: 56316281 R=rch@chromium.org Review URL: https://codereview.chromium.org/75163007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@235976 0039d316-1c4b-4281-b951-d872f2087c98
* Land Recent QUIC changes. rtenneti@chromium.org2013-10-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a bug in the QuicFramer where the entropy genererator was not being consulted when truncated acks were sent, causing an incorrect entropy to be sent for truncated acks. Merge internal change: 55879563 Add an optional initial RTT to the negotiation parameters to allow the QUIC client to suggest an expected RTT to the server. Merge internal change: 55792505 Changing DCHECKs to LOG(DFATAL) so we'll notice if they're occurring in the running server/client. Merge internal change: 55790448 Added a blank line per the change in the following CL which deleted default-true flags. Merge internal change: 55738366 Allow a REJ message to be twice as large as a CHLO message that doesn't contain a valid source-address token. message that doesn't contain a valid source-address token could be twice as large as before. Merge internal change: 55736193 Log OpenSSL errors when QUIC encryption fails. Merge internal change: 55718465 Second version with improved tests and keeping the client and server packet sizes identical to ensure the truncated ack detection works correctly. Merge internal change: 55651642 Hidden bug that uses ack_frame instead of stream_frame. Merge internal change: 55648483 Move QuicCryptoServerConfig from crypto_server_config.{h,cc} to quic_crypto_server_config.{h,cc} and move QuicCryptoClientConfig from crypt_handshake.{h,cc} to quic_crypto_client_config.{h,cc} to be consistent. Merge internal change: 55644306 Ported IOVector unit tests (as part of porting the following CL). Makes GFE's IOVector class copy-able. I am working on using IOVector through QUIC's read and write paths, and it would be tremendously helpful to have value-semantics for an IOVector object. Making it copy-able was noted in joechan@'s TODO in the original IOVector code. Merge internal change: 55509822 Cancel all pending alarms when the QUIC connection is closed. Merge internal change: 55640997 Removed version 10 from supported versions. Adding QUIC_VERSION_12 to optimize the Quic ack framing format to reduce the size and better handle ranges of nacks, which should make truncated acks virtually impossible. Also adding an explicit flag for truncated acks and moving the ack outside of the connection close frame. Merge internal change: 55594574 R=rch@chromium.org Review URL: https://codereview.chromium.org/51313002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232035 0039d316-1c4b-4281-b951-d872f2087c98
* Land Recent QUIC changes.rtenneti@chromium.org2013-10-271-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename ambiquious ConnectionClose method to OnConnectionClosed. Merge internal change: 54774694 Change TCP cubic's max packet size used to calculate the initial and subsequent congestion window in bytes to the default of 1460 from QUIC's artificially low 1200. Merge internal change: 54772582 QUIC: make the SCID a hash of the rest of the server config. We need to ensure that the SCID changes whenever the rest of the server config does. For example, cl/54004815 changed the server config, but not the SCID. This could lead to bad 0-RTT handshakes where the server believes the handshake is good, but will derive different keys than the client. The easiest change to ensure that the SCID is changed is to make it a hash of the rest of the message. Merge internal change: 54659325 EndToEndTest to fix TSAN. Merge internal change: 54090381 Don't add a zero-length public key to kPUBS if P-256 support is disabled. kKEXS and kPUBS should have the same number of elements. Merge internal change: 54004815 Make the QuicConnectionHelper no longer owned by the QuicConnection. Instead a single helper is owned by the Dispatcher or Client, and shared among each Connection. Merge internal change: 53974968 R=rch@chromium.org Review URL: https://codereview.chromium.org/45733002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231244 0039d316-1c4b-4281-b951-d872f2087c98