Internal change PiperOrigin-RevId: 408507559
diff --git a/quic/core/quic_connection.cc b/quic/core/quic_connection.cc index 87b1c86..ee706e5 100644 --- a/quic/core/quic_connection.cc +++ b/quic/core/quic_connection.cc
@@ -7013,7 +7013,12 @@ const QuicSocketAddress& direct_peer_address) : QuicPathValidator::ResultDelegate(), connection_(connection), - original_direct_peer_address_(direct_peer_address) {} + original_direct_peer_address_(direct_peer_address), + peer_address_default_path_(connection->direct_peer_address_), + peer_address_alternative_path_( + connection_->alternative_path_.peer_address), + active_effective_peer_migration_type_( + connection_->active_effective_peer_migration_type_) {} void QuicConnection::ReversePathValidationResultDelegate:: OnPathValidationSuccess( @@ -7022,6 +7027,30 @@ if (connection_->IsDefaultPath(context->self_address(), context->peer_address())) { QUIC_CODE_COUNT_N(quic_kick_off_client_address_validation, 3, 6); + if (connection_->active_effective_peer_migration_type_ == NO_CHANGE) { + connection_->quic_bug_10511_43_timestamp_ = + connection_->clock_->WallNow(); + connection_->quic_bug_10511_43_error_detail_ = absl::StrCat( + "Reverse path validation on default path from ", + context->self_address().ToString(), " to ", + context->peer_address().ToString(), + " completed without active peer address change: current " + "peer address on default path ", + connection_->direct_peer_address_.ToString(), + ", peer address on default path when the reverse path " + "validation was kicked off ", + peer_address_default_path_.ToString(), + ", peer address on alternative path when the reverse " + "path validation was kicked off ", + peer_address_alternative_path_.ToString(), + ", with active_effective_peer_migration_type_ = ", + AddressChangeTypeToString(active_effective_peer_migration_type_), + ". The last received packet number ", + connection_->last_header_.packet_number.ToString(), + " Connection is connected: ", connection_->connected_); + QUIC_BUG(quic_bug_10511_43) + << connection_->quic_bug_10511_43_error_detail_; + } connection_->OnEffectivePeerMigrationValidated(); } else { QUICHE_DCHECK(connection_->IsAlternativePath(
diff --git a/quic/core/quic_connection.h b/quic/core/quic_connection.h index 1ec7c7e..0709a78 100644 --- a/quic/core/quic_connection.h +++ b/quic/core/quic_connection.h
@@ -1259,6 +1259,14 @@ context_.tracer.swap(tracer); } + absl::optional<QuicWallTime> quic_bug_10511_43_timestamp() const { + return quic_bug_10511_43_timestamp_; + } + + const std::string& quic_bug_10511_43_error_detail() const { + return quic_bug_10511_43_error_detail_; + } + protected: // Calls cancel() on all the alarms owned by this connection. void CancelAllAlarms(); @@ -1479,6 +1487,11 @@ private: QuicConnection* connection_; QuicSocketAddress original_direct_peer_address_; + // TODO(b/205023946) Debug-only fields, to be deprecated after the bug is + // fixed. + QuicSocketAddress peer_address_default_path_; + QuicSocketAddress peer_address_alternative_path_; + AddressChangeType active_effective_peer_migration_type_; }; // A class which sets and clears in_on_retransmission_time_out_ when entering @@ -2277,6 +2290,11 @@ const bool reset_per_packet_state_for_undecryptable_packets_ = GetQuicReloadableFlag( quic_reset_per_packet_state_for_undecryptable_packets); + + // TODO(b/205023946) Debug-only fields, to be deprecated after the bug is + // fixed. + absl::optional<QuicWallTime> quic_bug_10511_43_timestamp_; + std::string quic_bug_10511_43_error_detail_; }; } // namespace quic