Deprecate QUIC reloadable flag quic_close_connection_on_underflow. PiperOrigin-RevId: 910415785
diff --git a/quiche/common/quiche_feature_flags_list.h b/quiche/common/quiche_feature_flags_list.h index 1ba8145..e427089 100755 --- a/quiche/common/quiche_feature_flags_list.h +++ b/quiche/common/quiche_feature_flags_list.h
@@ -19,7 +19,6 @@ QUICHE_FLAG(bool, quiche_reloadable_flag_quic_clear_body_manager_along_with_sequencer, true, true, "If true, QuicSpdyStream::StopReading always clears BodyManager along with the SequenceBuffer.") QUICHE_FLAG(bool, quiche_reloadable_flag_quic_clear_packet_on_serialization_failure, false, false, "If true, clear QuicPacketCreator state when serialization failure.") QUICHE_FLAG(bool, quiche_reloadable_flag_quic_client_check_blockage_before_on_can_write, false, false, "If true, quic clients will only call OnCanWrite() upon write events if the writer is unblocked.") -QUICHE_FLAG(bool, quiche_reloadable_flag_quic_close_connection_on_underflow, true, true, "If true, close QUIC connections if a RESET_STREAM frame is received with a too-small final byte offset value.") QUICHE_FLAG(bool, quiche_reloadable_flag_quic_close_on_idle_timeout, false, false, "If true, closes the connection if it has exceeded the idle timeout when deciding whether to open a stream.") QUICHE_FLAG(bool, quiche_reloadable_flag_quic_conservative_bursts, false, false, "If true, set burst token to 2 in cwnd bootstrapping experiment.") QUICHE_FLAG(bool, quiche_reloadable_flag_quic_conservative_cwnd_and_pacing_gains, false, false, "If true, uses conservative cwnd gain and pacing gain when cwnd gets bootstrapped.")
diff --git a/quiche/quic/core/quic_session.cc b/quiche/quic/core/quic_session.cc index 6f8ad27..4ff5df5 100644 --- a/quiche/quic/core/quic_session.cc +++ b/quiche/quic/core/quic_session.cc
@@ -1329,14 +1329,11 @@ QUIC_DVLOG(1) << ENDPOINT << "Received final byte offset " << final_byte_offset << " for stream " << stream_id; - if (GetQuicReloadableFlag(quic_close_connection_on_underflow)) { - QUIC_RELOADABLE_FLAG_COUNT(quic_close_connection_on_underflow); - if (final_byte_offset < it->second) { - connection_->CloseConnection( - QUIC_FLOW_CONTROL_FINAL_SIZE_CHANGED, "Invalid final byte offset", - ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET); - return; - } + if (final_byte_offset < it->second) { + connection_->CloseConnection( + QUIC_FLOW_CONTROL_FINAL_SIZE_CHANGED, "Invalid final byte offset", + ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET); + return; } QuicByteCount offset_diff = final_byte_offset - it->second; if (flow_controller_.UpdateHighestReceivedOffset(
diff --git a/quiche/quic/core/quic_session_test.cc b/quiche/quic/core/quic_session_test.cc index b121155..01a1b07 100644 --- a/quiche/quic/core/quic_session_test.cc +++ b/quiche/quic/core/quic_session_test.cc
@@ -3664,15 +3664,11 @@ /*control_frame_id=*/kInvalidControlFrameId, stream_id, QUIC_STREAM_CANCELLED, /*bytes_written=*/0); - if (GetQuicReloadableFlag(quic_close_connection_on_underflow)) { - EXPECT_CALL( - *connection_, - CloseConnection(QUIC_FLOW_CONTROL_FINAL_SIZE_CHANGED, - "Invalid final byte offset", - ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET)); - } else { - EXPECT_CALL(*connection_, CloseConnection(_, _, _)).Times(0); - } + EXPECT_CALL( + *connection_, + CloseConnection(QUIC_FLOW_CONTROL_FINAL_SIZE_CHANGED, + "Invalid final byte offset", + ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET)); session_.OnRstStream(malicious_rst); EXPECT_EQ(session_.flow_controller()->highest_received_byte_offset(), @@ -3680,11 +3676,7 @@ const QuicByteCount bytes_consumed_after = session_.flow_controller()->bytes_consumed(); - if (GetQuicReloadableFlag(quic_close_connection_on_underflow)) { - EXPECT_EQ(bytes_consumed_after, kDataSize); - } else { - EXPECT_NE(bytes_consumed_after, kDataSize); - } + EXPECT_EQ(bytes_consumed_after, kDataSize); } } // namespace