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

Side by Side Diff: net/quic/quic_sent_packet_manager.cc

Issue 284273002: Fix a QUIC bug where a crypto packet was never removed from the (Closed) Base URL: https://chromium.googlesource.com/chromium/src
Patch Set: Created 6 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | net/quic/quic_sent_packet_manager_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/quic_sent_packet_manager.h" 5 #include "net/quic/quic_sent_packet_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 for (QuicUnackedPacketMap::const_iterator it = unacked_packets_.begin(); 254 for (QuicUnackedPacketMap::const_iterator it = unacked_packets_.begin();
255 it != unacked_packets_.end(); ++it) { 255 it != unacked_packets_.end(); ++it) {
256 const RetransmittableFrames* frames = 256 const RetransmittableFrames* frames =
257 it->second.retransmittable_frames; 257 it->second.retransmittable_frames;
258 if (frames != NULL && frames->encryption_level() == ENCRYPTION_NONE) { 258 if (frames != NULL && frames->encryption_level() == ENCRYPTION_NONE) {
259 // Once you're forward secure, no unencrypted packets will be sent, crypto 259 // Once you're forward secure, no unencrypted packets will be sent, crypto
260 // or otherwise. Unencrypted packets are neutered and abandoned, to ensure 260 // or otherwise. Unencrypted packets are neutered and abandoned, to ensure
261 // they are not retransmitted or considered lost from a congestion control 261 // they are not retransmitted or considered lost from a congestion control
262 // perspective. 262 // perspective.
263 pending_retransmissions_.erase(it->first); 263 pending_retransmissions_.erase(it->first);
264 unacked_packets_.NeuterPacket(it->first);
265 unacked_packets_.SetNotPending(it->first); 264 unacked_packets_.SetNotPending(it->first);
265 // TODO(ianswett): Clean this up so UnackedPacketMap maintains the correct
266 // invariants between the various transmissions for NeuterPacket.
267 SequenceNumberSet all_transmissions = *it->second.all_transmissions;
268 for (SequenceNumberSet::const_iterator all_it = all_transmissions.begin();
269 all_it != all_transmissions.end(); ++all_it) {
270 unacked_packets_.NeuterPacket(*all_it);
271 }
266 } 272 }
267 } 273 }
268 } 274 }
269 275
270 void QuicSentPacketManager::MarkForRetransmission( 276 void QuicSentPacketManager::MarkForRetransmission(
271 QuicPacketSequenceNumber sequence_number, 277 QuicPacketSequenceNumber sequence_number,
272 TransmissionType transmission_type) { 278 TransmissionType transmission_type) {
273 const TransmissionInfo& transmission_info = 279 const TransmissionInfo& transmission_info =
274 unacked_packets_.GetTransmissionInfo(sequence_number); 280 unacked_packets_.GetTransmissionInfo(sequence_number);
275 LOG_IF(DFATAL, transmission_info.retransmittable_frames == NULL); 281 LOG_IF(DFATAL, transmission_info.retransmittable_frames == NULL);
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 return; 770 return;
765 } 771 }
766 772
767 using_pacing_ = true; 773 using_pacing_ = true;
768 send_algorithm_.reset( 774 send_algorithm_.reset(
769 new PacingSender(send_algorithm_.release(), 775 new PacingSender(send_algorithm_.release(),
770 QuicTime::Delta::FromMicroseconds(1))); 776 QuicTime::Delta::FromMicroseconds(1)));
771 } 777 }
772 778
773 } // namespace net 779 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/quic/quic_sent_packet_manager_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698