Allow long connection IDs for unknown QUIC versions
In particular, if we're a server and a client sends us a packet with an unknown version and a connection ID of any length between 8 and 255, we must respond with a version negotiation packet that includes that same connection ID.
gfe-relnote: allow longer connection IDs, protected by new disabled flag gfe2_restart_flag_quic_allow_very_long_connection_ids
PiperOrigin-RevId: 286015388
Change-Id: I53ff4e602a19f30f56aba10ad7d877776597a5cf
diff --git a/quic/core/quic_utils_test.cc b/quic/core/quic_utils_test.cc
index fa471f0..baaa3ae 100644
--- a/quic/core/quic_utils_test.cc
+++ b/quic/core/quic_utils_test.cc
@@ -184,7 +184,8 @@
TEST_F(QuicUtilsTest, ReplacementConnectionIdLengthIsCorrect) {
// Verify that all lengths get replaced by kQuicDefaultConnectionIdLength.
- const char connection_id_bytes[kQuicMaxConnectionIdAllVersionsLength] = {};
+ SetQuicRestartFlag(quic_allow_very_long_connection_ids, true);
+ const char connection_id_bytes[255] = {};
for (uint8_t i = 0; i < sizeof(connection_id_bytes) - 1; ++i) {
QuicConnectionId connection_id(connection_id_bytes, i);
QuicConnectionId replacement_connection_id =