Deprecate --gfe2_reloadable_flag_quic_discard_packets_with_invalid_cid
PiperOrigin-RevId: 392474439
diff --git a/quic/core/quic_dispatcher.cc b/quic/core/quic_dispatcher.cc
index 11f4bcd..a7345ea 100644
--- a/quic/core/quic_dispatcher.cc
+++ b/quic/core/quic_dispatcher.cc
@@ -512,19 +512,16 @@
return true;
}
- if (GetQuicReloadableFlag(quic_discard_packets_with_invalid_cid)) {
- QUIC_RELOADABLE_FLAG_COUNT(quic_discard_packets_with_invalid_cid);
- if (packet_info.version_flag && packet_info.version.IsKnown() &&
- !QuicUtils::IsConnectionIdLengthValidForVersion(
- server_connection_id.length(),
- packet_info.version.transport_version)) {
- QUIC_DLOG(INFO) << "Packet with destination connection ID "
- << server_connection_id << " is invalid with version "
- << packet_info.version;
- // Drop the packet silently.
- QUIC_CODE_COUNT(quic_dropped_invalid_initial_connection_id);
- return true;
- }
+ if (packet_info.version_flag && packet_info.version.IsKnown() &&
+ !QuicUtils::IsConnectionIdLengthValidForVersion(
+ server_connection_id.length(),
+ packet_info.version.transport_version)) {
+ QUIC_DLOG(INFO) << "Packet with destination connection ID "
+ << server_connection_id << " is invalid with version "
+ << packet_info.version;
+ // Drop the packet silently.
+ QUIC_CODE_COUNT(quic_dropped_invalid_initial_connection_id);
+ return true;
}
// Packets with connection IDs for active connections are processed
diff --git a/quic/core/quic_dispatcher_test.cc b/quic/core/quic_dispatcher_test.cc
index e713fe7..e927cda 100644
--- a/quic/core/quic_dispatcher_test.cc
+++ b/quic/core/quic_dispatcher_test.cc
@@ -1127,7 +1127,6 @@
TEST_P(QuicDispatcherTestAllVersions,
DropPacketWithKnownVersionAndInvalidInitialConnectionId) {
- SetQuicReloadableFlag(quic_discard_packets_with_invalid_cid, true);
CreateTimeWaitListManager();
QuicSocketAddress server_address;
diff --git a/quic/core/quic_flags_list.h b/quic/core/quic_flags_list.h
index 85fb592..a9d584f 100644
--- a/quic/core/quic_flags_list.h
+++ b/quic/core/quic_flags_list.h
@@ -87,8 +87,6 @@
QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_use_active_cid_for_session_lookup, true)
// If true, pass the received PATH_RESPONSE payload to path validator to move forward the path validation.
QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_pass_path_response_to_validator, true)
-// If true, quic dispatcher discards packets with invalid server connection ID.
-QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_discard_packets_with_invalid_cid, true)
// If true, quic dispatcher supports one connection to use multiple connection IDs.
QUIC_FLAG(FLAGS_quic_restart_flag_quic_dispatcher_support_multiple_cid_per_connection_v2, true)
// If true, receiving server push stream will trigger QUIC connection close.