OLD | NEW |
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 829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
840 } | 840 } |
841 | 841 |
842 if (!sent_entropy_manager_.IsValidEntropy( | 842 if (!sent_entropy_manager_.IsValidEntropy( |
843 incoming_ack.largest_observed, | 843 incoming_ack.largest_observed, |
844 incoming_ack.missing_packets, | 844 incoming_ack.missing_packets, |
845 incoming_ack.entropy_hash)) { | 845 incoming_ack.entropy_hash)) { |
846 DLOG(ERROR) << ENDPOINT << "Peer sent invalid entropy."; | 846 DLOG(ERROR) << ENDPOINT << "Peer sent invalid entropy."; |
847 return false; | 847 return false; |
848 } | 848 } |
849 | 849 |
850 for (QuicPacketNumber revived_packet : incoming_ack.revived_packets) { | 850 if (incoming_ack.latest_revived_packet != 0 && |
851 if (!incoming_ack.missing_packets.Contains(revived_packet)) { | 851 !incoming_ack.missing_packets.Contains( |
852 DLOG(ERROR) << ENDPOINT | 852 incoming_ack.latest_revived_packet)) { |
853 << "Peer specified revived packet which was not missing."; | 853 DLOG(ERROR) << ENDPOINT |
854 return false; | 854 << "Peer specified revived packet which was not missing."; |
855 } | 855 return false; |
856 } | 856 } |
857 return true; | 857 return true; |
858 } | 858 } |
859 | 859 |
860 bool QuicConnection::ValidateStopWaitingFrame( | 860 bool QuicConnection::ValidateStopWaitingFrame( |
861 const QuicStopWaitingFrame& stop_waiting) { | 861 const QuicStopWaitingFrame& stop_waiting) { |
862 if (stop_waiting.least_unacked < | 862 if (stop_waiting.least_unacked < |
863 received_packet_manager_.peer_least_packet_awaiting_ack()) { | 863 received_packet_manager_.peer_least_packet_awaiting_ack()) { |
864 DLOG(ERROR) << ENDPOINT << "Peer's sent low least_unacked: " | 864 DLOG(ERROR) << ENDPOINT << "Peer's sent low least_unacked: " |
865 << stop_waiting.least_unacked << " vs " | 865 << stop_waiting.least_unacked << " vs " |
(...skipping 1460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2326 packet_number_of_last_sent_packet_ + packets_between_mtu_probes_ + 1; | 2326 packet_number_of_last_sent_packet_ + packets_between_mtu_probes_ + 1; |
2327 ++mtu_probe_count_; | 2327 ++mtu_probe_count_; |
2328 | 2328 |
2329 DVLOG(2) << "Sending a path MTU discovery packet #" << mtu_probe_count_; | 2329 DVLOG(2) << "Sending a path MTU discovery packet #" << mtu_probe_count_; |
2330 SendMtuDiscoveryPacket(mtu_discovery_target_); | 2330 SendMtuDiscoveryPacket(mtu_discovery_target_); |
2331 | 2331 |
2332 DCHECK(!mtu_discovery_alarm_->IsSet()); | 2332 DCHECK(!mtu_discovery_alarm_->IsSet()); |
2333 } | 2333 } |
2334 | 2334 |
2335 } // namespace net | 2335 } // namespace net |
OLD | NEW |