| Index: net/quic/quic_connection.cc
|
| diff --git a/net/quic/quic_connection.cc b/net/quic/quic_connection.cc
|
| index 4a99c2fea287995f69f311535a18601ce524f64b..6e6d05f50f9699054e3eae7513530eeb809f11f8 100644
|
| --- a/net/quic/quic_connection.cc
|
| +++ b/net/quic/quic_connection.cc
|
| @@ -443,6 +443,10 @@ bool QuicConnection::OnPacketHeader(const QuicPacketHeader& header) {
|
| DVLOG(1) << ENDPOINT << "Ignoring packet from unexpected ConnectionId: "
|
| << header.public_header.connection_id << " instead of "
|
| << connection_id_;
|
| + if (debug_visitor_.get() != NULL) {
|
| + debug_visitor_->OnIncorrectConnectionId(
|
| + header.public_header.connection_id);
|
| + }
|
| return false;
|
| }
|
|
|
| @@ -461,8 +465,9 @@ bool QuicConnection::OnPacketHeader(const QuicPacketHeader& header) {
|
| header.packet_sequence_number)) {
|
| DVLOG(1) << ENDPOINT << "Packet " << header.packet_sequence_number
|
| << " no longer being waited for. Discarding.";
|
| - // TODO(jri): Log reception of duplicate packets or packets the peer has
|
| - // told us to stop waiting for.
|
| + if (debug_visitor_.get() != NULL) {
|
| + debug_visitor_->OnDuplicatePacket(header.packet_sequence_number);
|
| + }
|
| return false;
|
| }
|
|
|
| @@ -1087,10 +1092,13 @@ void QuicConnection::ProcessUdpPacket(const IPEndPoint& self_address,
|
| if (!framer_.ProcessPacket(packet)) {
|
| // If we are unable to decrypt this packet, it might be
|
| // because the CHLO or SHLO packet was lost.
|
| - if (encryption_level_ != ENCRYPTION_FORWARD_SECURE &&
|
| - framer_.error() == QUIC_DECRYPTION_FAILURE &&
|
| - undecryptable_packets_.size() < kMaxUndecryptablePackets) {
|
| - QueueUndecryptablePacket(packet);
|
| + if (framer_.error() == QUIC_DECRYPTION_FAILURE) {
|
| + if (encryption_level_ != ENCRYPTION_FORWARD_SECURE &&
|
| + undecryptable_packets_.size() < kMaxUndecryptablePackets) {
|
| + QueueUndecryptablePacket(packet);
|
| + } else if (debug_visitor_ != NULL) {
|
| + debug_visitor_->OnUndecryptablePacket();
|
| + }
|
| }
|
| DVLOG(1) << ENDPOINT << "Unable to process packet. Last packet processed: "
|
| << last_header_.packet_sequence_number;
|
| @@ -1687,6 +1695,11 @@ void QuicConnection::MaybeProcessUndecryptablePackets() {
|
| // new keys installed and hence any undecryptable packets will
|
| // never be able to be decrypted.
|
| if (encryption_level_ == ENCRYPTION_FORWARD_SECURE) {
|
| + if (debug_visitor_ != NULL) {
|
| + for (size_t i = 0; i < undecryptable_packets_.size(); ++i) {
|
| + debug_visitor_->OnUndecryptablePacket();
|
| + }
|
| + }
|
| STLDeleteElements(&undecryptable_packets_);
|
| }
|
| }
|
|
|