gfe-relnote: Remove the use of QUIC_CRYPTO_HANDSHAKE_STATELESS_REJECT.
PiperOrigin-RevId: 251847850
Change-Id: I0018b01d89e52a75d3259a22c6c5bfaac87b18b9
diff --git a/quic/core/quic_connection.cc b/quic/core/quic_connection.cc
index 83e6f04..5e8e100 100644
--- a/quic/core/quic_connection.cc
+++ b/quic/core/quic_connection.cc
@@ -3144,14 +3144,8 @@
SendConnectionClosePacket(error, error_details);
}
- ConnectionCloseSource source = ConnectionCloseSource::FROM_SELF;
- if (perspective_ == Perspective::IS_CLIENT &&
- error == QUIC_CRYPTO_HANDSHAKE_STATELESS_REJECT) {
- // Regard stateless rejected connection as closed by server.
- source = ConnectionCloseSource::FROM_PEER;
- }
-
- TearDownLocalConnectionState(error, error_details, source);
+ TearDownLocalConnectionState(error, error_details,
+ ConnectionCloseSource::FROM_SELF);
}
void QuicConnection::SendConnectionClosePacket(QuicErrorCode error,
diff --git a/quic/core/quic_connection_test.cc b/quic/core/quic_connection_test.cc
index b7c45d5..a2612b9 100644
--- a/quic/core/quic_connection_test.cc
+++ b/quic/core/quic_connection_test.cc
@@ -7685,17 +7685,6 @@
EXPECT_TRUE(writer_->ack_frames().empty());
}
-TEST_P(QuicConnectionTest, CloseConnectionForStatelessReject) {
- std::string error_details("stateless reject");
- EXPECT_CALL(visitor_, OnConnectionClosed(
- QUIC_CRYPTO_HANDSHAKE_STATELESS_REJECT,
- error_details, ConnectionCloseSource::FROM_PEER));
- connection_.set_perspective(Perspective::IS_CLIENT);
- connection_.CloseConnection(QUIC_CRYPTO_HANDSHAKE_STATELESS_REJECT,
- error_details,
- ConnectionCloseBehavior::SILENT_CLOSE);
-}
-
// Regression test for b/63620844.
TEST_P(QuicConnectionTest, FailedToWriteHandshakePacket) {
SimulateNextPacketTooLarge();
diff --git a/quic/core/quic_dispatcher.cc b/quic/core/quic_dispatcher.cc
index 7228af3..8a91711 100644
--- a/quic/core/quic_dispatcher.cc
+++ b/quic/core/quic_dispatcher.cc
@@ -623,13 +623,8 @@
void QuicDispatcher::CleanUpSession(SessionMap::iterator it,
QuicConnection* connection,
- bool should_close_statelessly,
ConnectionCloseSource source) {
write_blocked_list_.erase(connection);
- if (should_close_statelessly) {
- DCHECK(connection->termination_packets() != nullptr &&
- !connection->termination_packets()->empty());
- }
QuicTimeWaitListManager::TimeWaitAction action =
QuicTimeWaitListManager::SEND_STATELESS_RESET;
if (connection->termination_packets() != nullptr &&
@@ -762,9 +757,7 @@
}
closed_session_list_.push_back(std::move(it->second));
}
- const bool should_close_statelessly =
- (error == QUIC_CRYPTO_HANDSHAKE_STATELESS_REJECT);
- CleanUpSession(it, connection, should_close_statelessly, source);
+ CleanUpSession(it, connection, source);
}
void QuicDispatcher::OnWriteBlocked(
diff --git a/quic/core/quic_dispatcher.h b/quic/core/quic_dispatcher.h
index 790d4d2..1a023e0 100644
--- a/quic/core/quic_dispatcher.h
+++ b/quic/core/quic_dispatcher.h
@@ -324,11 +324,9 @@
QuicConnectionId server_connection_id);
// Removes the session from the session map and write blocked list, and adds
- // the ConnectionId to the time-wait list. If |session_closed_statelessly| is
- // true, any future packets for the ConnectionId will be black-holed.
+ // the ConnectionId to the time-wait list.
virtual void CleanUpSession(SessionMap::iterator it,
QuicConnection* connection,
- bool session_closed_statelessly,
ConnectionCloseSource source);
void StopAcceptingNewConnections();
diff --git a/quic/core/quic_error_codes.cc b/quic/core/quic_error_codes.cc
index 86c0896..cf95e1d 100644
--- a/quic/core/quic_error_codes.cc
+++ b/quic/core/quic_error_codes.cc
@@ -71,7 +71,6 @@
RETURN_STRING_LITERAL(QUIC_CRYPTO_MESSAGE_AFTER_HANDSHAKE_COMPLETE);
RETURN_STRING_LITERAL(QUIC_CRYPTO_INTERNAL_ERROR);
RETURN_STRING_LITERAL(QUIC_CRYPTO_VERSION_NOT_SUPPORTED);
- RETURN_STRING_LITERAL(QUIC_CRYPTO_HANDSHAKE_STATELESS_REJECT);
RETURN_STRING_LITERAL(QUIC_CRYPTO_NO_SUPPORT);
RETURN_STRING_LITERAL(QUIC_INVALID_CRYPTO_MESSAGE_TYPE);
RETURN_STRING_LITERAL(QUIC_INVALID_CRYPTO_MESSAGE_PARAMETER);
diff --git a/quic/core/quic_error_codes.h b/quic/core/quic_error_codes.h
index c8259f7..3de93f6 100644
--- a/quic/core/quic_error_codes.h
+++ b/quic/core/quic_error_codes.h
@@ -216,8 +216,8 @@
QUIC_CRYPTO_INTERNAL_ERROR = 38,
// A crypto handshake message specified an unsupported version.
QUIC_CRYPTO_VERSION_NOT_SUPPORTED = 39,
- // A crypto handshake message resulted in a stateless reject.
- QUIC_CRYPTO_HANDSHAKE_STATELESS_REJECT = 72,
+ // (Deprecated) A crypto handshake message resulted in a stateless reject.
+ // QUIC_CRYPTO_HANDSHAKE_STATELESS_REJECT = 72,
// There was no intersection between the crypto primitives supported by the
// peer and ourselves.
QUIC_CRYPTO_NO_SUPPORT = 40,