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

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

Issue 1784963002: Add more detailed logging to QUIC's ack validation. No functional change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@116277134
Patch Set: Created 4 years, 9 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_connection.h" 5 #include "net/quic/quic_connection.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 #include <sys/types.h> 8 #include <sys/types.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 LOG(WARNING) << ENDPOINT << "Peer's observed unsent packet:" 760 LOG(WARNING) << ENDPOINT << "Peer's observed unsent packet:"
761 << incoming_ack.largest_observed << " vs " 761 << incoming_ack.largest_observed << " vs "
762 << packet_generator_.packet_number(); 762 << packet_generator_.packet_number();
763 // We got an error for data we have not sent. Error out. 763 // We got an error for data we have not sent. Error out.
764 return "Largest observed too high"; 764 return "Largest observed too high";
765 } 765 }
766 766
767 if (incoming_ack.largest_observed < sent_packet_manager_.largest_observed()) { 767 if (incoming_ack.largest_observed < sent_packet_manager_.largest_observed()) {
768 LOG(WARNING) << ENDPOINT << "Peer's largest_observed packet decreased:" 768 LOG(WARNING) << ENDPOINT << "Peer's largest_observed packet decreased:"
769 << incoming_ack.largest_observed << " vs " 769 << incoming_ack.largest_observed << " vs "
770 << sent_packet_manager_.largest_observed(); 770 << sent_packet_manager_.largest_observed()
771 << " packet_number:" << last_header_.packet_number
772 << " largest seen with ack:" << largest_seen_packet_with_ack_
773 << " connection_id: " << connection_id_;
771 // A new ack has a diminished largest_observed value. Error out. 774 // A new ack has a diminished largest_observed value. Error out.
772 // If this was an old packet, we wouldn't even have checked. 775 // If this was an old packet, we wouldn't even have checked.
773 return "Largest observed too low"; 776 return "Largest observed too low";
774 } 777 }
775 778
776 if (!incoming_ack.missing_packets.Empty() && 779 if (!incoming_ack.missing_packets.Empty() &&
777 incoming_ack.missing_packets.Max() > incoming_ack.largest_observed) { 780 incoming_ack.missing_packets.Max() > incoming_ack.largest_observed) {
778 LOG(WARNING) << ENDPOINT << "Peer sent missing packet: " 781 LOG(WARNING) << ENDPOINT << "Peer sent missing packet: "
779 << incoming_ack.missing_packets.Max() 782 << incoming_ack.missing_packets.Max()
780 << " which is greater than largest observed: " 783 << " which is greater than largest observed: "
(...skipping 1563 matching lines...) Expand 10 before | Expand all | Expand 10 after
2344 } 2347 }
2345 2348
2346 StringPiece QuicConnection::GetCurrentPacket() { 2349 StringPiece QuicConnection::GetCurrentPacket() {
2347 if (current_packet_data_ == nullptr) { 2350 if (current_packet_data_ == nullptr) {
2348 return StringPiece(); 2351 return StringPiece();
2349 } 2352 }
2350 return StringPiece(current_packet_data_, last_size_); 2353 return StringPiece(current_packet_data_, last_size_);
2351 } 2354 }
2352 2355
2353 } // namespace net 2356 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698