Migration from QUIC_BUG to QUIC_BUG_V2(bug_id).
Per go/gfe-bug-improvements GFE_BUGs are getting stable IDs to allow for monitoring and alerting. Existing QUIC_BUG instances are changed to have `quic_bug_n_m` ID, where `n` is unique for each file, and `m` is a counter within each file, so we get `QUIC_BUG_V2(quic_bug_123_2)`
PiperOrigin-RevId: 361677239
Change-Id: I537fc53c4648a8b4a74ab8576b79b3c530bcb546
diff --git a/quic/core/tls_client_handshaker.cc b/quic/core/tls_client_handshaker.cc
index 7163bd5..84f9602 100644
--- a/quic/core/tls_client_handshaker.cc
+++ b/quic/core/tls_client_handshaker.cc
@@ -58,7 +58,7 @@
// TODO(b/154162689) add PSK support to QUIC+TLS.
std::string error_details =
"QUIC client pre-shared keys not yet supported with TLS";
- QUIC_BUG << error_details;
+ QUIC_BUG_V2(quic_bug_10576_1) << error_details;
CloseConnection(QUIC_HANDSHAKE_FAILED, error_details);
return false;
}
@@ -116,7 +116,8 @@
handshaker_delegate()->ProcessTransportParameters(
*(cached_state->transport_params),
/*is_resumption = */ true, &error_details) != QUIC_NO_ERROR) {
- QUIC_BUG << "Unable to parse cached transport parameters.";
+ QUIC_BUG_V2(quic_bug_10576_2)
+ << "Unable to parse cached transport parameters.";
CloseConnection(QUIC_HANDSHAKE_FAILED,
"Client failed to parse cached Transport Parameters.");
return false;
@@ -130,7 +131,8 @@
if (!cached_state->application_state ||
!session()->ResumeApplicationState(
cached_state->application_state.get())) {
- QUIC_BUG << "Unable to parse cached application state.";
+ QUIC_BUG_V2(quic_bug_10576_3)
+ << "Unable to parse cached application state.";
CloseConnection(QUIC_HANDSHAKE_FAILED,
"Client failed to parse cached application state.");
return false;
@@ -150,11 +152,11 @@
return true;
}
- QUIC_BUG << "ALPN missing";
+ QUIC_BUG_V2(quic_bug_10576_4) << "ALPN missing";
return false;
}
if (!std::all_of(alpns.begin(), alpns.end(), IsValidAlpn)) {
- QUIC_BUG << "ALPN too long";
+ QUIC_BUG_V2(quic_bug_10576_5) << "ALPN too long";
return false;
}
@@ -170,9 +172,10 @@
success =
success && (SSL_set_alpn_protos(ssl(), alpn, alpn_writer.length()) == 0);
if (!success) {
- QUIC_BUG << "Failed to set ALPN: "
- << quiche::QuicheTextUtils::HexDump(absl::string_view(
- alpn_writer.data(), alpn_writer.length()));
+ QUIC_BUG_V2(quic_bug_10576_6)
+ << "Failed to set ALPN: "
+ << quiche::QuicheTextUtils::HexDump(
+ absl::string_view(alpn_writer.data(), alpn_writer.length()));
return false;
}
@@ -186,7 +189,7 @@
if (SSL_add_application_settings(
ssl(), reinterpret_cast<const uint8_t*>(alpn_string.data()),
alpn_string.size(), nullptr, /* settings_len = */ 0) != 1) {
- QUIC_BUG << "Failed to enable ALPS.";
+ QUIC_BUG_V2(quic_bug_10576_7) << "Failed to enable ALPS.";
return false;
}
}
@@ -551,7 +554,7 @@
void TlsClientHandshaker::InsertSession(bssl::UniquePtr<SSL_SESSION> session) {
if (!received_transport_params_) {
- QUIC_BUG << "Transport parameters isn't received";
+ QUIC_BUG_V2(quic_bug_10576_8) << "Transport parameters isn't received";
return;
}
if (session_cache_ == nullptr) {