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

Unified Diff: net/quic/quic_connection.cc

Issue 157403006: Add QUIC_VERSION_15 to add a revived_packets set to replace the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/quic/quic_connection_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_connection.cc
diff --git a/net/quic/quic_connection.cc b/net/quic/quic_connection.cc
index e4ee743f9549c03aa3d5bb5d4c531c09b5a16a31..997be1c388b874968d15609f87bd586973cf808d 100644
--- a/net/quic/quic_connection.cc
+++ b/net/quic/quic_connection.cc
@@ -368,6 +368,11 @@ bool QuicConnection::OnPacketHeader(const QuicPacketHeader& header) {
debug_visitor_->OnPacketHeader(header);
}
+ if (header.fec_flag && framer_.version() <= QUIC_VERSION_14) {
+ DLOG(WARNING) << "Ignoring FEC packets for versions prior to 15.";
+ return false;
+ }
+
if (!ProcessValidatedPacket()) {
return false;
}
@@ -574,6 +579,15 @@ bool QuicConnection::ValidateAckFrame(const QuicAckFrame& incoming_ack) {
return false;
}
+ for (SequenceNumberSet::const_iterator iter =
+ incoming_ack.received_info.revived_packets.begin();
+ iter != incoming_ack.received_info.revived_packets.end(); ++iter) {
+ if (!ContainsKey(incoming_ack.received_info.missing_packets, *iter)) {
+ DLOG(ERROR) << ENDPOINT
+ << "Peer specified revived packet which was not missing.";
+ return false;
+ }
+ }
return true;
}
@@ -644,10 +658,13 @@ void QuicConnection::OnPacketComplete() {
return;
}
- received_packet_manager_.RecordPacketReceived(last_size_,
- last_header_,
- time_of_last_received_packet_,
- last_packet_revived_);
+ if (last_packet_revived_) {
+ received_packet_manager_.RecordPacketRevived(
+ last_header_.packet_sequence_number);
+ } else {
+ received_packet_manager_.RecordPacketReceived(
+ last_size_, last_header_, time_of_last_received_packet_);
+ }
for (size_t i = 0; i < last_stream_frames_.size(); ++i) {
stats_.stream_bytes_received +=
last_stream_frames_[i].data.TotalBufferSize();
« no previous file with comments | « no previous file | net/quic/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698