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

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

Issue 1658923003: Improve loggging to debug invalid acks. No functional change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@113053115
Patch Set: revert clang-format statements Created 4 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 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 810 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 LOG(WARNING) << ENDPOINT << "Peer sent missing packet: " 821 LOG(WARNING) << ENDPOINT << "Peer sent missing packet: "
822 << incoming_ack.missing_packets.Min() 822 << incoming_ack.missing_packets.Min()
823 << " which is smaller than least_packet_awaited_by_peer_: " 823 << " which is smaller than least_packet_awaited_by_peer_: "
824 << sent_packet_manager_.least_packet_awaited_by_peer(); 824 << sent_packet_manager_.least_packet_awaited_by_peer();
825 return "Missing packet smaller than least awaited"; 825 return "Missing packet smaller than least awaited";
826 } 826 }
827 827
828 if (!sent_entropy_manager_.IsValidEntropy(incoming_ack.largest_observed, 828 if (!sent_entropy_manager_.IsValidEntropy(incoming_ack.largest_observed,
829 incoming_ack.missing_packets, 829 incoming_ack.missing_packets,
830 incoming_ack.entropy_hash)) { 830 incoming_ack.entropy_hash)) {
831 LOG(WARNING) << ENDPOINT << "Peer sent invalid entropy."; 831 LOG(WARNING) << ENDPOINT << "Peer sent invalid entropy."
832 << " largest_observed:" << incoming_ack.largest_observed
833 << " last_received:" << last_header_.packet_number;
832 return "Invalid entropy"; 834 return "Invalid entropy";
833 } 835 }
834 836
835 if (incoming_ack.latest_revived_packet != 0 && 837 if (incoming_ack.latest_revived_packet != 0 &&
836 !incoming_ack.missing_packets.Contains( 838 !incoming_ack.missing_packets.Contains(
837 incoming_ack.latest_revived_packet)) { 839 incoming_ack.latest_revived_packet)) {
838 LOG(WARNING) << ENDPOINT 840 LOG(WARNING) << ENDPOINT
839 << "Peer specified revived packet which was not missing."; 841 << "Peer specified revived packet which was not missing."
842 << " revived_packet:" << incoming_ack.latest_revived_packet;
840 return "Invalid revived packet"; 843 return "Invalid revived packet";
841 } 844 }
842 return nullptr; 845 return nullptr;
843 } 846 }
844 847
845 const char* QuicConnection::ValidateStopWaitingFrame( 848 const char* QuicConnection::ValidateStopWaitingFrame(
846 const QuicStopWaitingFrame& stop_waiting) { 849 const QuicStopWaitingFrame& stop_waiting) {
847 if (stop_waiting.least_unacked < 850 if (stop_waiting.least_unacked <
848 received_packet_manager_.peer_least_packet_awaiting_ack()) { 851 received_packet_manager_.peer_least_packet_awaiting_ack()) {
849 DLOG(ERROR) << ENDPOINT << "Peer's sent low least_unacked: " 852 DLOG(ERROR) << ENDPOINT << "Peer's sent low least_unacked: "
(...skipping 1594 matching lines...) Expand 10 before | Expand all | Expand 10 after
2444 void QuicConnection::OnPathClosed(QuicPathId path_id) { 2447 void QuicConnection::OnPathClosed(QuicPathId path_id) {
2445 // Stop receiving packets on this path. 2448 // Stop receiving packets on this path.
2446 framer_.OnPathClosed(path_id); 2449 framer_.OnPathClosed(path_id);
2447 } 2450 }
2448 2451
2449 bool QuicConnection::ack_frame_updated() const { 2452 bool QuicConnection::ack_frame_updated() const {
2450 return received_packet_manager_.ack_frame_updated(); 2453 return received_packet_manager_.ack_frame_updated();
2451 } 2454 }
2452 2455
2453 } // namespace net 2456 } // 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