gfe-relnote: Remove stateless reject from QUIC. This deprecates two flags in the false position: --gfe2_reloadable_flag_enable_quic_stateless_reject_support and --gfe2_reloadable_flag_quic_use_cheap_stateless_rejects.
PiperOrigin-RevId: 250347964
Change-Id: I50e150f91e76b672160eadc04a379b529a4f602d
diff --git a/quic/core/crypto/crypto_handshake_message.cc b/quic/core/crypto/crypto_handshake_message.cc
index 579bb37..457d0fb 100644
--- a/quic/core/crypto/crypto_handshake_message.cc
+++ b/quic/core/crypto/crypto_handshake_message.cc
@@ -286,16 +286,6 @@
done = true;
}
break;
- case kRCID:
- // uint64_t value
- if (it->second.size() == 8) {
- uint64_t value;
- memcpy(&value, it->second.data(), sizeof(value));
- value = QuicEndian::NetToHost64(value);
- ret += QuicTextUtils::Uint64ToString(value);
- done = true;
- }
- break;
case kTBKP:
case kKEXS:
case kAEAD:
diff --git a/quic/core/crypto/crypto_protocol.h b/quic/core/crypto/crypto_protocol.h
index e8c8d84..e63224a 100644
--- a/quic/core/crypto/crypto_protocol.h
+++ b/quic/core/crypto/crypto_protocol.h
@@ -27,14 +27,13 @@
typedef std::string ServerConfigID;
// The following tags have been deprecated and should not be reused:
-// "BBQ4"
+// "BBQ4", "RCID", "SREJ"
// clang-format off
const QuicTag kCHLO = TAG('C', 'H', 'L', 'O'); // Client hello
const QuicTag kSHLO = TAG('S', 'H', 'L', 'O'); // Server hello
const QuicTag kSCFG = TAG('S', 'C', 'F', 'G'); // Server config
const QuicTag kREJ = TAG('R', 'E', 'J', '\0'); // Reject
-const QuicTag kSREJ = TAG('S', 'R', 'E', 'J'); // Stateless reject
const QuicTag kCETV = TAG('C', 'E', 'T', 'V'); // Client encrypted tag-value
// pairs
const QuicTag kPRST = TAG('P', 'R', 'S', 'T'); // Public reset
@@ -245,9 +244,7 @@
// Rejection tags
const QuicTag kRREJ = TAG('R', 'R', 'E', 'J'); // Reasons for server sending
-// Stateless Reject tags
-const QuicTag kRCID = TAG('R', 'C', 'I', 'D'); // Server-designated
- // connection ID
+
// Server hello tags
const QuicTag kCADR = TAG('C', 'A', 'D', 'R'); // Client IP address and port
const QuicTag kASAD = TAG('A', 'S', 'A', 'D'); // Alternate Server IP address
diff --git a/quic/core/crypto/crypto_server_test.cc b/quic/core/crypto/crypto_server_test.cc
index 5d86dcb..306a28b 100644
--- a/quic/core/crypto/crypto_server_test.cc
+++ b/quic/core/crypto/crypto_server_test.cc
@@ -148,14 +148,6 @@
SERVER_CONFIG_INCHOATE_HELLO_FAILURE};
CheckRejectReasons(kRejectReasons, QUIC_ARRAYSIZE(kRejectReasons));
- // TODO(wub): Delete this block when deprecating RCID.
- {
- uint64_t server_designated_connection_id;
- EXPECT_EQ(QUIC_CRYPTO_MESSAGE_PARAMETER_NOT_FOUND,
- out_.GetUint64(kRCID, &server_designated_connection_id));
- rand_for_id_generation_.ChangeValue();
- }
-
QuicStringPiece srct;
ASSERT_TRUE(out_.GetStringPiece(kSourceAddressTokenTag, &srct));
srct_hex_ = "#" + QuicTextUtils::HexEncode(srct);
diff --git a/quic/core/crypto/quic_crypto_client_config.cc b/quic/core/crypto/quic_crypto_client_config.cc
index d216f66..4fca4bb 100644
--- a/quic/core/crypto/quic_crypto_client_config.cc
+++ b/quic/core/crypto/quic_crypto_client_config.cc
@@ -761,8 +761,8 @@
std::string* error_details) {
DCHECK(error_details != nullptr);
- if ((rej.tag() != kREJ) && (rej.tag() != kSREJ)) {
- *error_details = "Message is not REJ or SREJ";
+ if (rej.tag() != kREJ) {
+ *error_details = "Message is not REJ";
return QUIC_CRYPTO_INTERNAL_ERROR;
}
@@ -778,30 +778,6 @@
out_params->server_nonce = std::string(nonce);
}
- if (rej.tag() == kSREJ) {
- QuicConnectionId connection_id;
-
- QuicStringPiece connection_id_bytes;
- if (!rej.GetStringPiece(kRCID, &connection_id_bytes)) {
- *error_details = "Missing kRCID";
- return QUIC_CRYPTO_MESSAGE_PARAMETER_NOT_FOUND;
- }
- connection_id = QuicConnectionId(connection_id_bytes.data(),
- connection_id_bytes.length());
- if (!QuicUtils::IsConnectionIdValidForVersion(connection_id, version)) {
- QUIC_PEER_BUG << "Received server-designated connection ID "
- << connection_id << " which is invalid with version "
- << QuicVersionToString(version);
- *error_details = "Bad kRCID length";
- return QUIC_CRYPTO_INTERNAL_ERROR;
- }
- cached->add_server_designated_connection_id(connection_id);
- if (!nonce.empty()) {
- cached->add_server_nonce(std::string(nonce));
- }
- return QUIC_NO_ERROR;
- }
-
return QUIC_NO_ERROR;
}
diff --git a/quic/core/crypto/quic_crypto_server_config.cc b/quic/core/crypto/quic_crypto_server_config.cc
index 404a29e..54d4bf4 100644
--- a/quic/core/crypto/quic_crypto_server_config.cc
+++ b/quic/core/crypto/quic_crypto_server_config.cc
@@ -1437,28 +1437,8 @@
const std::vector<uint32_t>& reject_reasons,
CryptoHandshakeMessage* out) const {
const QuicWallTime now = context.clock()->WallNow();
- if (GetQuicReloadableFlag(enable_quic_stateless_reject_support) &&
- context.use_stateless_rejects()) {
- QUIC_DVLOG(1) << "QUIC Crypto server config returning stateless reject "
- << "with server-designated connection ID "
- << context.server_designated_connection_id();
- out->set_tag(kSREJ);
- if (!QuicUtils::IsConnectionIdValidForVersion(
- context.server_designated_connection_id(),
- context.transport_version())) {
- QUIC_BUG << "Tried to send server designated connection ID "
- << context.server_designated_connection_id()
- << " which is invalid with version "
- << QuicVersionToString(context.transport_version());
- return;
- }
- out->SetStringPiece(
- kRCID,
- QuicStringPiece(context.server_designated_connection_id().data(),
- context.server_designated_connection_id().length()));
- } else {
- out->set_tag(kREJ);
- }
+
+ out->set_tag(kREJ);
out->SetStringPiece(kSCFG, config.serialized);
out->SetStringPiece(
kSourceAddressTokenTag,
diff --git a/quic/core/crypto/quic_crypto_server_config.h b/quic/core/crypto/quic_crypto_server_config.h
index 9f3a7bc..039da84 100644
--- a/quic/core/crypto/quic_crypto_server_config.h
+++ b/quic/core/crypto/quic_crypto_server_config.h
@@ -338,6 +338,8 @@
const QuicSocketAddress& client_address,
ParsedQuicVersion version,
const ParsedQuicVersionVector& supported_versions,
+ // TODO(wub): Deprecate use_stateless_rejects and
+ // server_designated_connection_id.
bool use_stateless_rejects,
QuicConnectionId server_designated_connection_id,
const QuicClock* clock,